fix travis (#28052)

* fix travis

* Update partnership.class.php
This commit is contained in:
Frédéric FRANCE 2024-02-07 16:19:07 +01:00 committed by GitHub
parent d4e8c6bf9a
commit ac5f5a7cc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 5 deletions

View file

@ -1061,6 +1061,21 @@ class Partnership extends CommonObject
return $result;
}
/**
* 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
*/
public static function replaceThirdparty($db, $origin_id, $dest_id)
{
$tables = array('partnership');
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
}
/**
* Return the label of the status
*

View file

@ -5301,7 +5301,7 @@ class Societe extends CommonObject
*/
public function mergeCompany($soc_origin_id)
{
global $langs, $hookmanager, $user, $action;
global $conf, $langs, $hookmanager, $user, $action;
$error = 0;
$soc_origin = new Societe($this->db); // The thirdparty that we will delete
@ -5413,16 +5413,16 @@ class Societe extends CommonObject
'Account' => '/compta/bank/class/account.class.php',
'ConferenceOrBoothAttendee' => '/eventorganization/class/conferenceorboothattendee.class.php'
);
if ($this->db->DDLListTables($this->db->database_name, 'don')) {
if ($this->db->DDLListTables($conf->db->name, $this->db->prefix().'don')) {
$objects['Don'] = '/don/class/don.class.php';
}
if ($this->db->DDLListTables($this->db->database_name, 'partnership')) {
if ($this->db->DDLListTables($conf->db->name, $this->db->prefix().'partnership')) {
$objects['PartnerShip'] = '/partnership/class/partnership.class.php';
}
if ($this->db->DDLListTables($this->db->database_name, 'fichinter')) {
if ($this->db->DDLListTables($conf->db->name, $this->db->prefix().'fichinter')) {
$objects['Fichinter'] = '/fichinter/class/fichinter.class.php';
}
if ($this->db->DDLListTables($this->db->database_name, 'ticket')) {
if ($this->db->DDLListTables($conf->db->name, $this->db->prefix().'ticket')) {
$objects['Ticket'] = '/ticket/class/ticket.class.php';
}