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
|
* 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
|
* 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
|
* 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;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret=dol_delete_file($original_file);
|
$ret=dol_delete_file($original_file);
|
||||||
if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
|
if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
|
||||||
else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
|
else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
|
||||||
|
|
||||||
dol_syslog("document.php back to ".urldecode($urlsource), LOG_DEBUG);
|
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"
|
$array_selected[$field]=count($array_selected)+1; // We tag the key $field as "selected"
|
||||||
// We check if there is a dependency
|
// 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'))
|
$tmp=$fieldsdependenciesarray[$fieldsentitiesarray[$field]]; // $fieldsdependenciesarray=array('element'=>'fd.rowid') or array('element'=>array('fd.rowid','ab.rowid'))
|
||||||
if (is_array($tmp)) $listofdependencies=$tmp;
|
if (is_array($tmp)) $listofdependencies=$tmp;
|
||||||
else $listofdependencies=array($tmp);
|
else $listofdependencies=array($tmp);
|
||||||
foreach($listofdependencies as $fieldid)
|
foreach($listofdependencies as $fieldid)
|
||||||
{
|
{
|
||||||
if (empty($array_selected[$fieldid]))
|
if (empty($array_selected[$fieldid]))
|
||||||
|
|||||||
@ -118,28 +118,28 @@ function checkLinkedElements($sourcetype, $targettype)
|
|||||||
function clean_data_ecm_directories()
|
function clean_data_ecm_directories()
|
||||||
{
|
{
|
||||||
global $db, $langs;
|
global $db, $langs;
|
||||||
|
|
||||||
// Clean data from ecm_directories
|
// Clean data from ecm_directories
|
||||||
$sql="SELECT rowid, label FROM ".MAIN_DB_PREFIX."ecm_directories";
|
$sql="SELECT rowid, label FROM ".MAIN_DB_PREFIX."ecm_directories";
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
while($obj=$db->fetch_object($resql))
|
while($obj=$db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$id=$obj->rowid;
|
$id=$obj->rowid;
|
||||||
$label=$obj->label;
|
$label=$obj->label;
|
||||||
$newlabel=dol_sanitizeFileName($label);
|
$newlabel=dol_sanitizeFileName($label);
|
||||||
if ($label != $newlabel)
|
if ($label != $newlabel)
|
||||||
{
|
{
|
||||||
$sqlupdate="UPDATE ".MAIN_DB_PREFIX."ecm_directories set label='".$newlabel."' WHERE rowid=".$id;
|
$sqlupdate="UPDATE ".MAIN_DB_PREFIX."ecm_directories set label='".$newlabel."' WHERE rowid=".$id;
|
||||||
print '<tr><td>'.$sqlupdate."</td></tr>\n";
|
print '<tr><td>'.$sqlupdate."</td></tr>\n";
|
||||||
$resqlupdate=$db->query($sqlupdate);
|
$resqlupdate=$db->query($sqlupdate);
|
||||||
if (! $resqlupdate) dol_print_error($db,'Failed to update');
|
if (! $resqlupdate) dol_print_error($db,'Failed to update');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else dol_print_error($db,'Failed to run request');
|
else dol_print_error($db,'Failed to run request');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,15 +43,15 @@ class ActionsCardProduct extends Product
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $DB Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param string $dirmodule Name of directory of module
|
* @param string $dirmodule Name of directory of module
|
||||||
* @param string $targetmodule Name of directory where canvas is stored
|
* @param string $targetmodule Name of directory where canvas is stored
|
||||||
* @param string $canvas Name of canvas
|
* @param string $canvas Name of canvas
|
||||||
* @param string $card Name of tab (sub-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->dirmodule = $dirmodule;
|
||||||
$this->targetmodule = $targetmodule;
|
$this->targetmodule = $targetmodule;
|
||||||
$this->canvas = $canvas;
|
$this->canvas = $canvas;
|
||||||
|
|||||||
@ -43,14 +43,14 @@ class ActionsCardService extends Product
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* 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 $targetmodule Name of directory of module where canvas is stored
|
||||||
* @param string $canvas Name of canvas
|
* @param string $canvas Name of canvas
|
||||||
* @param string $card Name of tab (sub-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->targetmodule = $targetmodule;
|
||||||
$this->canvas = $canvas;
|
$this->canvas = $canvas;
|
||||||
$this->card = $card;
|
$this->card = $card;
|
||||||
|
|||||||
@ -37,15 +37,15 @@ class ActionsCardCompany extends ActionsCardCommon
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* 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 $dirmodule Name of directory of module
|
||||||
* @param string $targetmodule Name of directory of module where canvas is stored
|
* @param string $targetmodule Name of directory of module where canvas is stored
|
||||||
* @param string $canvas Name of canvas
|
* @param string $canvas Name of canvas
|
||||||
* @param string $card Name of tab (sub-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->dirmodule = $dirmodule;
|
||||||
$this->targetmodule = $targetmodule;
|
$this->targetmodule = $targetmodule;
|
||||||
$this->canvas = $canvas;
|
$this->canvas = $canvas;
|
||||||
|
|||||||
@ -36,15 +36,15 @@ class ActionsCardIndividual extends ActionsCardCommon
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* 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 $dirmodule Name of directory of module
|
||||||
* @param string $targetmodule Name of directory of module where canvas is stored
|
* @param string $targetmodule Name of directory of module where canvas is stored
|
||||||
* @param string $canvas Name of canvas
|
* @param string $canvas Name of canvas
|
||||||
* @param string $card Name of tab (sub-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->dirmodule = $dirmodule;
|
||||||
$this->targetmodule = $targetmodule;
|
$this->targetmodule = $targetmodule;
|
||||||
$this->canvas = $canvas;
|
$this->canvas = $canvas;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user