Fix: change the last $DB to $db
This commit is contained in:
parent
166bcb2a03
commit
e44fd4885d
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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]))
|
||||
|
||||
@ -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 '<tr><td>'.$sqlupdate."</td></tr>\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 '<tr><td>'.$sqlupdate."</td></tr>\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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user