Fix warnings
This commit is contained in:
parent
3f4b0549cb
commit
6824f82cc8
@ -254,18 +254,18 @@ class Bookmark extends CommonObject
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'bookmark'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1962,18 +1962,18 @@ class Categorie extends CommonObject
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'categorie_societe'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables, 1);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -2261,18 +2261,18 @@ class ActionComm extends CommonObject
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'actioncomm'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -3860,18 +3860,18 @@ class Propal extends CommonObject
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'propal'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -4043,18 +4043,18 @@ class Commande extends CommonOrder
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'commande'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1771,35 +1771,35 @@ class FactureRec extends CommonInvoice
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'facture_rec'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to replace a product id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old product id
|
||||
* @param int $dest_id New product id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old product id
|
||||
* @param int $dest_id New product id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceProduct(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceProduct(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'facturedet_rec'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceProduct($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceProduct($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -5190,18 +5190,18 @@ class Facture extends CommonInvoice
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old third-party id
|
||||
* @param int $dest_id New third-party id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'facture'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -167,17 +167,17 @@ class LignePrelevement
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'prelevement_lignes'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1712,18 +1712,18 @@ class Contact extends CommonObject
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'socpeople', 'societe_contacts'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -2474,18 +2474,18 @@ class Contrat extends CommonObject
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'contrat'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -8431,19 +8431,19 @@ abstract class CommonObject
|
||||
* This function is meant to be called from replaceThirdparty with the appropriate tables
|
||||
* Column name fk_soc MUST be used to identify thirdparties
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param DoliDB $dbs Database handler
|
||||
* @param int $origin_id Old thirdparty id (the thirdparty to delete)
|
||||
* @param int $dest_id New thirdparty id (the thirdparty that will received element of the other)
|
||||
* @param string[] $tables Tables that need to be changed
|
||||
* @param int $ignoreerrors Ignore errors. Return true even if errors. We need this when replacement can fails like for categories (categorie of old thirdparty may already exists on new one)
|
||||
* @return bool True if success, False if error
|
||||
*/
|
||||
public static function commonReplaceThirdparty(DoliDB $db, $origin_id, $dest_id, array $tables, $ignoreerrors = 0)
|
||||
public static function commonReplaceThirdparty(DoliDB $dbs, $origin_id, $dest_id, array $tables, $ignoreerrors = 0)
|
||||
{
|
||||
foreach ($tables as $table) {
|
||||
$sql = 'UPDATE '.$db->prefix().$table.' SET fk_soc = '.((int) $dest_id).' WHERE fk_soc = '.((int) $origin_id);
|
||||
$sql = 'UPDATE '.$dbs->prefix().$table.' SET fk_soc = '.((int) $dest_id).' WHERE fk_soc = '.((int) $origin_id);
|
||||
|
||||
if (!$db->query($sql)) {
|
||||
if (!$dbs->query($sql)) {
|
||||
if ($ignoreerrors) {
|
||||
return true; // TODO Not enough. If there is A-B on kept thirdparty and B-C on old one, we must get A-B-C after merge. Not A-B.
|
||||
}
|
||||
@ -8460,19 +8460,19 @@ abstract class CommonObject
|
||||
* This function is meant to be called from replaceProduct with the appropriate tables
|
||||
* Column name fk_product MUST be used to identify products
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param DoliDB $dbs Database handler
|
||||
* @param int $origin_id Old product id (the product to delete)
|
||||
* @param int $dest_id New product id (the product that will received element of the other)
|
||||
* @param string[] $tables Tables that need to be changed
|
||||
* @param int $ignoreerrors Ignore errors. Return true even if errors. We need this when replacement can fails like for categories (categorie of old product may already exists on new one)
|
||||
* @return bool True if success, False if error
|
||||
*/
|
||||
public static function commonReplaceProduct(DoliDB $db, $origin_id, $dest_id, array $tables, $ignoreerrors = 0)
|
||||
public static function commonReplaceProduct(DoliDB $dbs, $origin_id, $dest_id, array $tables, $ignoreerrors = 0)
|
||||
{
|
||||
foreach ($tables as $table) {
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$table.' SET fk_product = '.((int) $dest_id).' WHERE fk_product = '.((int) $origin_id);
|
||||
|
||||
if (!$db->query($sql)) {
|
||||
if (!$dbs->query($sql)) {
|
||||
if ($ignoreerrors) {
|
||||
return true; // TODO Not enough. If there is A-B on kept product and B-C on old one, we must get A-B-C after merge. Not A-B.
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ class DolGraph
|
||||
{
|
||||
public $type = array(); // Array with type of each series. Example: array('bars', 'horizontalbars', 'lines', 'pies', 'piesemicircle', 'polar'...)
|
||||
public $mode = 'side'; // Mode bars graph: side, depth
|
||||
private $_library = 'chart'; // Graphic library to use (jflot, chart, artichow)
|
||||
private $_library; // Graphic library to use (jflot, chart, artichow)
|
||||
|
||||
//! Array of data
|
||||
public $data; // Data of graph: array(array('abs1',valA1,valB1), array('abs2',valA2,valB2), ...)
|
||||
|
||||
@ -1483,7 +1483,7 @@ class Form
|
||||
}
|
||||
|
||||
if (!empty($conf->global->SOCIETE_SHOW_VAT_IN_LIST) && !empty($obj->tva_intra)) {
|
||||
$label .= ' - '.$obj->tva_intra.'';
|
||||
$label .= ' - '.$obj->tva_intra;
|
||||
}
|
||||
|
||||
$labelhtml = $label;
|
||||
|
||||
@ -347,7 +347,7 @@ class FormTicket
|
||||
print $langs->trans('SubjectAnswerToTicket').' '.$this->topic_title;
|
||||
} else {
|
||||
if (isset($this->withreadid) && $this->withreadid > 0) {
|
||||
$subject = $langs->trans('SubjectAnswerToTicket').' '.$this->withreadid.' : '.$this->topic_title.'';
|
||||
$subject = $langs->trans('SubjectAnswerToTicket').' '.$this->withreadid.' : '.$this->topic_title;
|
||||
} else {
|
||||
$subject = GETPOST('subject', 'alpha');
|
||||
}
|
||||
|
||||
@ -99,8 +99,6 @@ class mailing_contacts1 extends MailingTargets
|
||||
*/
|
||||
public function getNbOfRecipients($sql = '')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT count(distinct(c.email)) as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as c";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = c.fk_soc";
|
||||
|
||||
@ -130,7 +130,7 @@ class pdf_beluga extends ModelePDFProjects
|
||||
* Page orientation
|
||||
* @var string 'P' or 'Portait' (default), 'L' or 'Landscape'
|
||||
*/
|
||||
private $orientation = '';
|
||||
private $orientation;
|
||||
|
||||
/**
|
||||
* Issuer
|
||||
|
||||
@ -1085,18 +1085,18 @@ class Delivery extends CommonObject
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'delivery'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1101,18 +1101,18 @@ class Don extends CommonObject
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old third-party id
|
||||
* @param int $dest_id New third-party id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'don'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1102,18 +1102,18 @@ class ConferenceOrBoothAttendee extends CommonObject
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'eventorganization_conferenceorboothattendee'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2450,18 +2450,18 @@ class Expedition extends CommonObject
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'expedition'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -761,7 +761,7 @@ if ($action == 'create') {
|
||||
|
||||
if ($user->rights->ficheinter->creer) {
|
||||
print '<div class="inline-block divButAction">';
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=createfrommodel&token='.newToken().'';
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=createfrommodel&token='.newToken();
|
||||
print '&socid='.$object->thirdparty->id.'&id='.$object->id.'">';
|
||||
print $langs->trans("AddIntervention").'</a></div>';
|
||||
}
|
||||
|
||||
@ -1383,18 +1383,18 @@ class Fichinter extends CommonObject
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'fichinter'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -683,16 +683,16 @@ class FichinterRec extends Fichinter
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array('fichinter_rec');
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -209,17 +209,17 @@ class Fournisseur extends Societe
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old third-party id
|
||||
* @param int $dest_id New third-party id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'facture_fourn'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3265,18 +3265,18 @@ class CommandeFournisseur extends CommonOrder
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'commande_fournisseur'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1737,18 +1737,18 @@ class FactureFournisseurRec extends CommonInvoice
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'facture_rec'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -3154,18 +3154,18 @@ class FactureFournisseur extends CommonInvoice
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'facture_fourn'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1003,35 +1003,35 @@ class ProductFournisseur extends Product
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'product_fournisseur_price'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to replace a product id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old product id
|
||||
* @param int $dest_id New product id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceProduct(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceProduct(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'product_fournisseur_price'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceProduct($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceProduct($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -683,12 +683,12 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
||||
if ($board->nbtodolate > 0) {
|
||||
$boxwork .= '<div class="dashboardlinelatecoin nowrap">';
|
||||
$boxwork .= '<a title="'.dol_escape_htmltag($textlate).'" class="valignmiddle dashboardlineindicatorlate'.($board->nbtodolate > 0 ? ' dashboardlineko' : ' dashboardlineok').'" href="'.((!$board->url_late) ? $board->url : $board->url_late).'">';
|
||||
//$boxwork .= img_picto($textlate, "warning_white", 'class="valigntextbottom"').'';
|
||||
//$boxwork .= img_picto($textlate, "warning_white", 'class="valigntextbottom"');
|
||||
$boxwork .= img_picto(
|
||||
$textlate,
|
||||
"warning_white",
|
||||
'class="inline-block hideonsmartphone valigntextbottom"'
|
||||
).'';
|
||||
);
|
||||
$boxwork .= '<span class="dashboardlineindicatorlate'.($board->nbtodolate > 0 ? ' dashboardlineko' : ' dashboardlineok').'">';
|
||||
$boxwork .= $board->nbtodolate;
|
||||
$boxwork .= '</span>';
|
||||
|
||||
@ -15,59 +15,59 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @var bool Hide PHP informations */
|
||||
/** @var boolean $force_install_nophpinfo Hide PHP informations */
|
||||
$force_install_nophpinfo = true;
|
||||
|
||||
/** @var int 1 = Lock and hide environment variables, 2 = Lock all set variables */
|
||||
/** @var int $force_install_noedit 1 = Lock and hide environment variables, 2 = Lock all set variables */
|
||||
$force_install_noedit = 2;
|
||||
|
||||
/** @var string Information message */
|
||||
/** @var string $force_install_message Information message */
|
||||
$force_install_message = 'Welcome to your Dolibarr install';
|
||||
|
||||
/** @var string Data root absolute path (documents folder) */
|
||||
/** @var string $force_install_main_data_root Data root absolute path (documents folder) */
|
||||
$force_install_main_data_root = null;
|
||||
|
||||
/** @var bool Force HTTPS */
|
||||
/** @var boolean $force_install_mainforcehttps Force HTTPS */
|
||||
$force_install_mainforcehttps = true;
|
||||
|
||||
/** @var string Database name */
|
||||
/** @var string $force_install_database Database name */
|
||||
$force_install_database = 'dolibarr';
|
||||
|
||||
/** @var string Database driver (mysql|mysqli|pgsql|mssql|sqlite|sqlite3) */
|
||||
/** @var string $force_install_type Database driver (mysql|mysqli|pgsql|mssql|sqlite|sqlite3) */
|
||||
$force_install_type = 'mysqli';
|
||||
|
||||
/** @var string Database server host */
|
||||
/** @var string $force_install_dbserver Database server host */
|
||||
$force_install_dbserver = 'localhost';
|
||||
|
||||
/** @var int Database server port */
|
||||
/** @var int $force_install_port Database server port */
|
||||
$force_install_port = 3306;
|
||||
|
||||
/** @var string Database tables prefix */
|
||||
/** @var string $force_install_prefix Database tables prefix */
|
||||
$force_install_prefix = 'llx_';
|
||||
|
||||
/** @var bool Force database creation */
|
||||
/** @var bool $force_install_createdatabase Force database creation */
|
||||
$force_install_createdatabase = true;
|
||||
|
||||
/** @var string Database username */
|
||||
/** @var string $force_install_databaselogin Database username */
|
||||
$force_install_databaselogin = 'root';
|
||||
|
||||
/** @var string Database password */
|
||||
/** @var string $force_install_databasepass Database password */
|
||||
$force_install_databasepass = '';
|
||||
|
||||
/** @var bool Force database user creation */
|
||||
/** @var bool $force_install_createuser Force database user creation */
|
||||
$force_install_createuser = false;
|
||||
|
||||
/** @var string Database root username */
|
||||
/** @var string $force_install_databaserootlogin Database root username */
|
||||
$force_install_databaserootlogin = 'root';
|
||||
|
||||
/** @var string Database root password */
|
||||
/** @var string $force_install_databaserootpass Database root password */
|
||||
$force_install_databaserootpass = '';
|
||||
|
||||
/** @var string Dolibarr super-administrator username */
|
||||
/** @var string $force_install_dolibarrlogin Dolibarr super-administrator username */
|
||||
$force_install_dolibarrlogin = 'admin';
|
||||
|
||||
/** @var bool Force install locking */
|
||||
/** @var bool $force_install_lockinstall Force install locking */
|
||||
$force_install_lockinstall = true;
|
||||
|
||||
/** @var string Enable module(s) (Comma separated class names list) */
|
||||
/** @var string $force_install_module Enable module(s) (Comma separated class names list) */
|
||||
$force_install_module = 'modSociete,modFournisseur,modFacture';
|
||||
|
||||
@ -183,13 +183,14 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets
|
||||
* For example if this selector is used to extract 500 different
|
||||
* emails from a text file, this function must return 500.
|
||||
*
|
||||
* @param string $filter Filter
|
||||
* @param string $option Options
|
||||
* @return int Nb of recipients or -1 if KO
|
||||
* @param string $sql Not use here
|
||||
* @return int Nb of recipients or -1 if KO
|
||||
*/
|
||||
public function getNbOfRecipients($filter = 1, $option = '')
|
||||
public function getNbOfRecipients($sql = '')
|
||||
{
|
||||
$a = parent::getNbOfRecipients("select count(distinct(email)) as nb from ".MAIN_DB_PREFIX."myobject as p where email IS NOT NULL AND email != ''");
|
||||
$sql = "select count(distinct(email)) as nb from ".MAIN_DB_PREFIX."myobject as p where email IS NOT NULL AND email != ''";
|
||||
|
||||
$a = parent::getNbOfRecipients($sql);
|
||||
|
||||
if ($a < 0) {
|
||||
return -1;
|
||||
|
||||
@ -444,7 +444,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
$error++;
|
||||
setEventMessages($errors, null, 'errors');
|
||||
setEventMessages('', $errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6103,19 +6103,19 @@ class Product extends CommonObject
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @param DoliDB $dbs Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'product_customer_price',
|
||||
'product_customer_price_log'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -2167,18 +2167,18 @@ class Project extends CommonObject
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @param DoliDB $dbs Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'projet'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2006,32 +2006,32 @@ class Reception extends CommonObject
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array('reception');
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to replace a product id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old product id
|
||||
* @param int $dest_id New product id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceProduct(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceProduct(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'commande_fournisseur_dispatch'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceProduct($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceProduct($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1129,7 +1129,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
||||
print '....'.$companypaymentmodetemp->last_four;
|
||||
}
|
||||
if ($companypaymentmodetemp->exp_date_month || $companypaymentmodetemp->exp_date_year) {
|
||||
print ' - '.sprintf("%02d", $companypaymentmodetemp->exp_date_month).'/'.$companypaymentmodetemp->exp_date_year.'';
|
||||
print ' - '.sprintf("%02d", $companypaymentmodetemp->exp_date_month).'/'.$companypaymentmodetemp->exp_date_year;
|
||||
}
|
||||
print '</td><td>';
|
||||
if ($companypaymentmodetemp->country_code) {
|
||||
@ -1236,7 +1236,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
||||
// Information
|
||||
print '<td valign="middle">';
|
||||
if ($src->object == 'card') {
|
||||
print '....'.$src->last4.' - '.$src->exp_month.'/'.$src->exp_year.'';
|
||||
print '....'.$src->last4.' - '.$src->exp_month.'/'.$src->exp_year;
|
||||
print '</td><td>';
|
||||
if ($src->country) {
|
||||
$img = picto_from_langcode($src->country);
|
||||
@ -1246,7 +1246,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
||||
print img_warning().' <span class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</span>';
|
||||
}
|
||||
} elseif ($src->object == 'source' && $src->type == 'card') {
|
||||
print '<span class="opacitymedium">'.$src->owner->name.'</span><br>....'.$src->card->last4.' - '.$src->card->exp_month.'/'.$src->card->exp_year.'';
|
||||
print '<span class="opacitymedium">'.$src->owner->name.'</span><br>....'.$src->card->last4.' - '.$src->card->exp_month.'/'.$src->card->exp_year;
|
||||
print '</td><td>';
|
||||
|
||||
if ($src->card->country) {
|
||||
@ -1267,7 +1267,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
||||
print img_warning().' <span class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</span>';
|
||||
}
|
||||
} elseif ($src->object == 'payment_method' && $src->type == 'card') {
|
||||
print '<span class="opacitymedium">'.$src->billing_details->name.'</span><br>....'.$src->card->last4.' - '.$src->card->exp_month.'/'.$src->card->exp_year.'';
|
||||
print '<span class="opacitymedium">'.$src->billing_details->name.'</span><br>....'.$src->card->last4.' - '.$src->card->exp_month.'/'.$src->card->exp_year;
|
||||
print '</td><td>';
|
||||
|
||||
if ($src->card->country) {
|
||||
|
||||
@ -2693,18 +2693,18 @@ class SupplierProposal extends CommonObject
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'supplier_proposal'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -3642,18 +3642,18 @@ class User extends CommonObject
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
* @param int $dest_id New thirdparty id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'user',
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
return CommonObject::commonReplaceThirdparty($dbs, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -218,7 +218,7 @@ if ($object->id > 0) {
|
||||
// Name (already in dol_banner, we keep it to have the GlobalGroup picto, but we should move it in dol_banner)
|
||||
if (!empty($conf->mutlicompany->enabled)) {
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Name").'</td>';
|
||||
print '<td colspan="2">'.$object->name.'';
|
||||
print '<td colspan="2">'.$object->name;
|
||||
if (!$object->entity) {
|
||||
print img_picto($langs->trans("GlobalGroup"), 'redstar');
|
||||
}
|
||||
|
||||
13
qodana.yaml
13
qodana.yaml
@ -42,6 +42,15 @@ exclude:
|
||||
- name: PhpArrayIsAlwaysEmptyInspection
|
||||
- name: PhpParameterByRefIsNotUsedAsReferenceInspection
|
||||
- name: PhpWrongStringConcatenationInspection
|
||||
- name: PhpUnusedAliasInspection
|
||||
- name: PhpUnusedPrivateMethodInspection
|
||||
- name: PhpUnusedPrivateFieldInspection
|
||||
- name: PhpExpressionAlwaysNullInspection
|
||||
- name: PhpIfWithCommonPartsInspection
|
||||
|
||||
- name: PhpIfWithCommonPartsInspection
|
||||
- name: PhpTernaryExpressionCanBeReducedToShortVersionInspection
|
||||
- name: PhpExpressionWithSameOperandsInspection
|
||||
- name: PhpInArrayCanBeReplacedWithComparisonInspection
|
||||
- name: PhpUnusedAliasInspection
|
||||
- name: PhpPossiblePolymorphicInvocationInspection
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user