diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 77b511a9e89..36da9e9840a 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2508,11 +2508,11 @@ class PropaleLigne /** * Class line Contructor * - * @param DoliDB $DB Database handler + * @param DoliDB $db Database handler */ - function __construct($DB) + function __construct($db) { - $this->db= $DB; + $this->db= $db; } /** diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 2bf5a733e1c..031bd143db6 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2867,11 +2867,11 @@ class OrderLine /** * Constructor * - * @param DoliDB $DB handler d'acces base de donnee + * @param DoliDB $db handler d'acces base de donnee */ - function __construct($DB) + function __construct($db) { - $this->db= $DB; + $this->db= $db; } /** diff --git a/htdocs/core/modules/mailings/example.modules.php b/htdocs/core/modules/mailings/example.modules.php index 8783f305044..518f565cec5 100644 --- a/htdocs/core/modules/mailings/example.modules.php +++ b/htdocs/core/modules/mailings/example.modules.php @@ -42,11 +42,11 @@ class mailing_example extends MailingTargets /** * Constructor * - * @param DoliDB $DB Database handler + * @param DoliDB $db Database handler */ - function __construct($DB) + function __construct($db) { - $this->db=$DB; + $this->db=$db; } diff --git a/htdocs/document.php b/htdocs/document.php index a509bc3bd7c..2d629bcae7a 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -499,8 +499,8 @@ if ($action == 'remove_file') // Remove a file exit; } - $ret=dol_delete_file($original_file); - if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); + $ret=dol_delete_file($original_file); + if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); dol_syslog("document.php back to ".urldecode($urlsource), LOG_DEBUG); diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index 676881e1c95..b37dc17944e 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -108,11 +108,11 @@ if ($action=='selectfield') $array_selected[$field]=count($array_selected)+1; // We tag the key $field as "selected" // We check if there is a dependency - if (! empty($fieldsdependenciesarray[$fieldsentitiesarray[$field]])) + if (! empty($fieldsdependenciesarray[$fieldsentitiesarray[$field]])) { $tmp=$fieldsdependenciesarray[$fieldsentitiesarray[$field]]; // $fieldsdependenciesarray=array('element'=>'fd.rowid') or array('element'=>array('fd.rowid','ab.rowid')) if (is_array($tmp)) $listofdependencies=$tmp; - else $listofdependencies=array($tmp); + else $listofdependencies=array($tmp); foreach($listofdependencies as $fieldid) { if (empty($array_selected[$fieldid])) diff --git a/htdocs/install/lib/repair.lib.php b/htdocs/install/lib/repair.lib.php index d965c1ff9c8..af0d7774830 100644 --- a/htdocs/install/lib/repair.lib.php +++ b/htdocs/install/lib/repair.lib.php @@ -118,28 +118,28 @@ function checkLinkedElements($sourcetype, $targettype) function clean_data_ecm_directories() { global $db, $langs; - - // Clean data from ecm_directories - $sql="SELECT rowid, label FROM ".MAIN_DB_PREFIX."ecm_directories"; - $resql=$db->query($sql); - if ($resql) - { - while($obj=$db->fetch_object($resql)) - { - $id=$obj->rowid; - $label=$obj->label; - $newlabel=dol_sanitizeFileName($label); - if ($label != $newlabel) - { - $sqlupdate="UPDATE ".MAIN_DB_PREFIX."ecm_directories set label='".$newlabel."' WHERE rowid=".$id; - print ''.$sqlupdate."\n"; + + // Clean data from ecm_directories + $sql="SELECT rowid, label FROM ".MAIN_DB_PREFIX."ecm_directories"; + $resql=$db->query($sql); + if ($resql) + { + while($obj=$db->fetch_object($resql)) + { + $id=$obj->rowid; + $label=$obj->label; + $newlabel=dol_sanitizeFileName($label); + if ($label != $newlabel) + { + $sqlupdate="UPDATE ".MAIN_DB_PREFIX."ecm_directories set label='".$newlabel."' WHERE rowid=".$id; + print ''.$sqlupdate."\n"; $resqlupdate=$db->query($sqlupdate); - if (! $resqlupdate) dol_print_error($db,'Failed to update'); - } - - } - } - else dol_print_error($db,'Failed to run request'); + if (! $resqlupdate) dol_print_error($db,'Failed to update'); + } + + } + } + else dol_print_error($db,'Failed to run request'); return; } diff --git a/htdocs/product/canvas/product/actions_card_product.class.php b/htdocs/product/canvas/product/actions_card_product.class.php index 73ea52ce705..f829e784004 100755 --- a/htdocs/product/canvas/product/actions_card_product.class.php +++ b/htdocs/product/canvas/product/actions_card_product.class.php @@ -43,15 +43,15 @@ class ActionsCardProduct extends Product /** * Constructor * - * @param DoliDB $DB Database handler + * @param DoliDB $db Database handler * @param string $dirmodule Name of directory of module * @param string $targetmodule Name of directory where canvas is stored * @param string $canvas Name of canvas * @param string $card Name of tab (sub-canvas) */ - function __construct($DB, $dirmodule, $targetmodule, $canvas, $card) + function __construct($db, $dirmodule, $targetmodule, $canvas, $card) { - $this->db = $DB; + $this->db = $db; $this->dirmodule = $dirmodule; $this->targetmodule = $targetmodule; $this->canvas = $canvas; diff --git a/htdocs/product/canvas/service/actions_card_service.class.php b/htdocs/product/canvas/service/actions_card_service.class.php index 92182531d01..1a885245e86 100755 --- a/htdocs/product/canvas/service/actions_card_service.class.php +++ b/htdocs/product/canvas/service/actions_card_service.class.php @@ -43,14 +43,14 @@ class ActionsCardService extends Product /** * Constructor * - * @param DoliDB $DB Handler acces base de donnees + * @param DoliDB $db Handler acces base de donnees * @param string $targetmodule Name of directory of module where canvas is stored * @param string $canvas Name of canvas * @param string $card Name of tab (sub-canvas) */ - function __construct($DB,$targetmodule,$canvas,$card) + function __construct($db,$targetmodule,$canvas,$card) { - $this->db = $DB; + $this->db = $db; $this->targetmodule = $targetmodule; $this->canvas = $canvas; $this->card = $card; diff --git a/htdocs/societe/canvas/company/actions_card_company.class.php b/htdocs/societe/canvas/company/actions_card_company.class.php index b31ff85e95c..b4e55b9e657 100644 --- a/htdocs/societe/canvas/company/actions_card_company.class.php +++ b/htdocs/societe/canvas/company/actions_card_company.class.php @@ -37,15 +37,15 @@ class ActionsCardCompany extends ActionsCardCommon /** * Constructor * - * @param DoliDB $DB Handler acces base de donnees + * @param DoliDB $db Handler acces base de donnees * @param string $dirmodule Name of directory of module * @param string $targetmodule Name of directory of module where canvas is stored * @param string $canvas Name of canvas * @param string $card Name of tab (sub-canvas) */ - function __construct($DB, $dirmodule, $targetmodule, $canvas, $card) + function __construct($db, $dirmodule, $targetmodule, $canvas, $card) { - $this->db = $DB; + $this->db = $db; $this->dirmodule = $dirmodule; $this->targetmodule = $targetmodule; $this->canvas = $canvas; diff --git a/htdocs/societe/canvas/individual/actions_card_individual.class.php b/htdocs/societe/canvas/individual/actions_card_individual.class.php index 8b807e9960b..74f64e07a1e 100644 --- a/htdocs/societe/canvas/individual/actions_card_individual.class.php +++ b/htdocs/societe/canvas/individual/actions_card_individual.class.php @@ -36,15 +36,15 @@ class ActionsCardIndividual extends ActionsCardCommon /** * Constructor * - * @param DoliDB $DB Handler acces base de donnees + * @param DoliDB $db Handler acces base de donnees * @param string $dirmodule Name of directory of module * @param string $targetmodule Name of directory of module where canvas is stored * @param string $canvas Name of canvas * @param string $card Name of tab (sub-canvas) */ - function __construct($DB, $dirmodule, $targetmodule, $canvas, $card) + function __construct($db, $dirmodule, $targetmodule, $canvas, $card) { - $this->db = $DB; + $this->db = $db; $this->dirmodule = $dirmodule; $this->targetmodule = $targetmodule; $this->canvas = $canvas;