diff --git a/htdocs/blockedlog/class/authority.class.php b/htdocs/blockedlog/class/authority.class.php index b976857a522..0102a5d88d6 100644 --- a/htdocs/blockedlog/class/authority.class.php +++ b/htdocs/blockedlog/class/authority.class.php @@ -52,7 +52,6 @@ class BlockedLogAuthority */ public function __construct($db) { - $this->db = $db; } diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index dc45c9a4fb0..ea67873c2ee 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -82,7 +82,6 @@ class PaymentSalary extends CommonObject $this->db = $db; $this->element = 'payment_salary'; $this->table_element = 'payment_salary'; - return 1; } /** diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 2ea82fb32c4..3067242ae16 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -76,7 +76,6 @@ class ChargeSociales extends CommonObject function __construct($db) { $this->db = $db; - return 1; } /** diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php index 2f9a8636c8b..f07916a7511 100644 --- a/htdocs/core/class/ccountry.class.php +++ b/htdocs/core/class/ccountry.class.php @@ -76,7 +76,6 @@ class Ccountry // extends CommonObject function __construct($db) { $this->db = $db; - return 1; } diff --git a/htdocs/core/class/cstate.class.php b/htdocs/core/class/cstate.class.php index 085da06c754..13c02ed777a 100644 --- a/htdocs/core/class/cstate.class.php +++ b/htdocs/core/class/cstate.class.php @@ -70,7 +70,6 @@ class Cstate // extends CommonObject function __construct($db) { $this->db = $db; - return 1; } diff --git a/htdocs/core/class/ctypent.class.php b/htdocs/core/class/ctypent.class.php index 9366cf6317b..db8ed461727 100644 --- a/htdocs/core/class/ctypent.class.php +++ b/htdocs/core/class/ctypent.class.php @@ -66,7 +66,6 @@ class Ctypent // extends CommonObject function __construct($db) { $this->db = $db; - return 1; } diff --git a/htdocs/core/class/events.class.php b/htdocs/core/class/events.class.php index 2ac2a51d2ed..436a708d312 100644 --- a/htdocs/core/class/events.class.php +++ b/htdocs/core/class/events.class.php @@ -117,7 +117,6 @@ class Events // extends CommonObject function __construct($db) { $this->db = $db; - return 1; } diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index de4dc46ac90..c4ab50179d9 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -79,9 +79,7 @@ class Fiscalyear extends CommonObject $this->db = $db; $this->statuts_short = array(0 => 'Opened', 1 => 'Closed'); - $this->statuts = array(0 => 'Opened', 1 => 'Closed'); - - return 1; + $this->statuts = array(0 => 'Opened', 1 => 'Closed'); } /** diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index e01e1f2ad65..25a3973cbd8 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -48,7 +48,6 @@ class FormActions function __construct($db) { $this->db = $db; - return 1; } diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 22fa73741ce..8d8e65e5130 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -41,7 +41,6 @@ class FormAdmin function __construct($db) { $this->db = $db; - return 1; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps diff --git a/htdocs/core/class/html.formbarcode.class.php b/htdocs/core/class/html.formbarcode.class.php index c2c408801c4..eb08aab6de7 100644 --- a/htdocs/core/class/html.formbarcode.class.php +++ b/htdocs/core/class/html.formbarcode.class.php @@ -48,7 +48,6 @@ class FormBarCode function __construct($db) { $this->db = $db; - return 1; } diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 5c39bc0cef4..273a84cbc94 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -49,8 +49,6 @@ class FormCompany function __construct($db) { $this->db = $db; - - return 1; } diff --git a/htdocs/core/class/html.formcron.class.php b/htdocs/core/class/html.formcron.class.php index 496d77f1f68..94747481cb0 100644 --- a/htdocs/core/class/html.formcron.class.php +++ b/htdocs/core/class/html.formcron.class.php @@ -46,7 +46,6 @@ class FormCron extends Form function __construct($db) { $this->db = $db; - return 1; } diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index c1bc479fc73..9f2f82fb50c 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -54,7 +54,6 @@ class FormFile { $this->db = $db; $this->numoffiles=0; - return 1; } diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 45a4b153cec..c11b0beef6e 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -132,8 +132,6 @@ class FormMail extends Form $this->withbodyreadonly=0; $this->withdeliveryreceiptreadonly=0; $this->withfckeditor=-1; // -1 = Auto - - return 1; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps diff --git a/htdocs/core/class/html.formmargin.class.php b/htdocs/core/class/html.formmargin.class.php index 405e47e19c7..cdd827145b0 100644 --- a/htdocs/core/class/html.formmargin.class.php +++ b/htdocs/core/class/html.formmargin.class.php @@ -32,7 +32,7 @@ class FormMargin * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ @@ -47,8 +47,6 @@ class FormMargin function __construct($db) { $this->db = $db; - - return 1; } diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 93b17669c2c..f30e2aed325 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -53,8 +53,6 @@ class FormOther function __construct($db) { $this->db = $db; - - return 1; } diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index e9e1d8fe6c9..4465a207e82 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -48,7 +48,6 @@ class FormProjets function __construct($db) { $this->db = $db; - return 1; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps diff --git a/htdocs/core/class/html.formsms.class.php b/htdocs/core/class/html.formsms.class.php index a549485ac4c..1e8a35fe3a4 100644 --- a/htdocs/core/class/html.formsms.class.php +++ b/htdocs/core/class/html.formsms.class.php @@ -84,8 +84,6 @@ class FormSms $this->withtoreadonly=0; $this->withtopicreadonly=0; $this->withbodyreadonly=0; - - return 1; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 7ed11bb81e8..5d2136bd236 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -112,8 +112,6 @@ class FormTicket $this->withref = 0; $this->withextrafields = 0; // Show extrafields or not //$this->withtopicreadonly=0; - - return 1; } /** diff --git a/htdocs/core/class/html.formwebsite.class.php b/htdocs/core/class/html.formwebsite.class.php index e14d8217b55..f5feccd5860 100644 --- a/htdocs/core/class/html.formwebsite.class.php +++ b/htdocs/core/class/html.formwebsite.class.php @@ -28,7 +28,7 @@ class FormWebsite { private $db; - + /** * @var string Error code (or message) */ @@ -43,8 +43,6 @@ class FormWebsite function __construct($db) { $this->db = $db; - - return 1; } diff --git a/htdocs/core/class/link.class.php b/htdocs/core/class/link.class.php index b1196d6746b..8413725ab11 100644 --- a/htdocs/core/class/link.class.php +++ b/htdocs/core/class/link.class.php @@ -62,11 +62,7 @@ class Link extends CommonObject */ public function __construct($db) { - global $conf; - $this->db = $db; - - return 1; } diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php index 23e888de0fc..4532a7a294a 100644 --- a/htdocs/core/class/rssparser.class.php +++ b/htdocs/core/class/rssparser.class.php @@ -61,7 +61,7 @@ class RssParser */ public function __construct($db) { - $this->db=$db; + $this->db = $db; } /** diff --git a/htdocs/core/modules/mailings/advthirdparties.modules.php b/htdocs/core/modules/mailings/advthirdparties.modules.php index f41992bee14..4d149e0e5ef 100644 --- a/htdocs/core/modules/mailings/advthirdparties.modules.php +++ b/htdocs/core/modules/mailings/advthirdparties.modules.php @@ -46,8 +46,6 @@ class mailing_advthirdparties extends MailingTargets */ function __construct($db) { - global $conf; - $this->db=$db; } diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index 670ac6556b7..26d81c08385 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -92,7 +92,6 @@ class Cronjob extends CommonObject function __construct($db) { $this->db = $db; - return 1; } diff --git a/htdocs/expedition/class/expeditionbatch.class.php b/htdocs/expedition/class/expeditionbatch.class.php index 3fc821c7b85..611a9a750df 100644 --- a/htdocs/expedition/class/expeditionbatch.class.php +++ b/htdocs/expedition/class/expeditionbatch.class.php @@ -51,7 +51,6 @@ class ExpeditionLineBatch extends CommonObject function __construct($db) { $this->db = $db; - return 1; } /** diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 53ac035c0be..3b6b9628f6a 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -148,8 +148,6 @@ class ExpenseReport extends CommonObject $this->statuts_short = array(0 => 'Draft', 2 => 'Validated', 4 => 'Canceled', 5 => 'Approved', 6 => 'Paid', 99 => 'Refused'); $this->statuts = array(0 => 'Draft', 2 => 'ValidatedWaitingApproval', 4 => 'Canceled', 5 => 'Approved', 6 => 'Paid', 99 => 'Refused'); $this->statuts_logo = array(0 => 'statut0', 2 => 'statut1', 4 => 'statut5', 5 => 'statut3', 6 => 'statut6', 99 => 'statut5'); - - return 1; } /** diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index 906e9bb1377..309c5f2deff 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -103,8 +103,6 @@ class CommandeFournisseurDispatch extends CommonObject $this->statutshort[0] = 'Received'; $this->statutshort[1] = 'Verified'; $this->statutshort[2] = 'Denied'; - - return 1; } diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 20850964a66..d3f51b21e50 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -93,8 +93,6 @@ class Establishment extends CommonObject $this->statuts_short = array(0 => 'Closed', 1 => 'Opened'); $this->statuts = array(0 => 'Closed', 1 => 'Opened'); - - return 1; } /** diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index 437c72f258a..cbd78a763dc 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -75,7 +75,6 @@ class Loan extends CommonObject function __construct($db) { $this->db = $db; - return 1; } /** diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 169aebde712..2e6789b3f89 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -111,7 +111,6 @@ class Opensurveysondage extends CommonObject function __construct($db) { $this->db = $db; - return 1; } diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 22b5e4656a7..5356d212c38 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -52,8 +52,6 @@ class FormProduct function __construct($db) { $this->db = $db; - - return 1; } diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 5952df20345..12ddfb9e6d7 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -354,8 +354,6 @@ class Product extends CommonObject */ function __construct($db) { - global $langs; - $this->db = $db; $this->canvas = ''; } diff --git a/htdocs/product/class/productbatch.class.php b/htdocs/product/class/productbatch.class.php index fc36c64a3eb..f6a7df212eb 100644 --- a/htdocs/product/class/productbatch.class.php +++ b/htdocs/product/class/productbatch.class.php @@ -56,7 +56,6 @@ class Productbatch extends CommonObject function __construct($db) { $this->db = $db; - return 1; } diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 0d1d7ae4484..7f9e5a0b383 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -75,9 +75,7 @@ class Productcustomerprice extends CommonObject */ function __construct($db) { - $this->db = $db; - return 1; } /** diff --git a/htdocs/product/class/propalmergepdfproduct.class.php b/htdocs/product/class/propalmergepdfproduct.class.php index e58e09c4bfd..3a7f3fb586d 100644 --- a/htdocs/product/class/propalmergepdfproduct.class.php +++ b/htdocs/product/class/propalmergepdfproduct.class.php @@ -62,7 +62,6 @@ class Propalmergepdfproduct extends CommonObject function __construct($db) { $this->db = $db; - return 1; } diff --git a/htdocs/product/dynamic_price/class/price_expression.class.php b/htdocs/product/dynamic_price/class/price_expression.class.php index c7300be5d20..6b73b413522 100644 --- a/htdocs/product/dynamic_price/class/price_expression.class.php +++ b/htdocs/product/dynamic_price/class/price_expression.class.php @@ -65,7 +65,6 @@ class PriceExpression function __construct($db) { $this->db = $db; - return 1; } diff --git a/htdocs/product/dynamic_price/class/price_global_variable.class.php b/htdocs/product/dynamic_price/class/price_global_variable.class.php index ebdba3b5949..4cd900979ab 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable.class.php @@ -71,7 +71,6 @@ class PriceGlobalVariable function __construct($db) { $this->db = $db; - return 1; } diff --git a/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php b/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php index 14ea4357a66..b06a249ccc6 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php @@ -78,7 +78,6 @@ class PriceGlobalVariableUpdater function __construct($db) { $this->db = $db; - return 1; } diff --git a/htdocs/projet/class/taskstats.class.php b/htdocs/projet/class/taskstats.class.php index 84633944250..4164c1427b6 100644 --- a/htdocs/projet/class/taskstats.class.php +++ b/htdocs/projet/class/taskstats.class.php @@ -36,8 +36,6 @@ class TaskStats extends Stats */ function __construct($db) { - global $conf, $user; - $this->db = $db; require_once 'task.class.php'; diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index 4d3a4a55c74..1c04a5633ec 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -61,7 +61,6 @@ class Dolresource extends CommonObject function __construct($db) { $this->db = $db; - return 1; } /** diff --git a/htdocs/resource/class/html.formresource.class.php b/htdocs/resource/class/html.formresource.class.php index b95ba78e2be..f541a7728cb 100644 --- a/htdocs/resource/class/html.formresource.class.php +++ b/htdocs/resource/class/html.formresource.class.php @@ -55,8 +55,6 @@ class FormResource function __construct($db) { $this->db = $db; - - return 1; } diff --git a/htdocs/ticket/class/ticketlogs.class.php b/htdocs/ticket/class/ticketlogs.class.php index c5e77bc9dae..01ba7972ced 100644 --- a/htdocs/ticket/class/ticketlogs.class.php +++ b/htdocs/ticket/class/ticketlogs.class.php @@ -75,7 +75,6 @@ class Ticketlogs// extends CommonObject public function __construct($db) { $this->db = $db; - return 1; } /**