Fix scrutinizer
This commit is contained in:
parent
a1c93cb2e6
commit
2ed96c9e5f
@ -1514,8 +1514,8 @@ class Contact extends CommonObject
|
||||
/**
|
||||
* Get Contact roles for a thirdparty
|
||||
*
|
||||
* @param string $element element type
|
||||
* @return array|int
|
||||
* @param string $element Element type
|
||||
* @return array|int Array of contact roles or -1
|
||||
* @throws Exception
|
||||
*/
|
||||
public function getContactRoles($element = '')
|
||||
|
||||
@ -74,7 +74,7 @@ class box_accountancy_suspense_account extends ModeleBoxes
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
|
||||
|
||||
$bookkeepingstatic = new BookKeeping($this->db);
|
||||
//$bookkeepingstatic = new BookKeeping($this->db);
|
||||
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleSuspenseAccount"));
|
||||
|
||||
@ -103,7 +103,7 @@ class box_accountancy_suspense_account extends ModeleBoxes
|
||||
|
||||
$this->info_box_contents[0][1] = array(
|
||||
'td' => 'class="right"',
|
||||
'text' => '<a href="' . DOL_URL_ROOT . '/accountancy/bookkeeping/list.php?search_accountancy_code_start='.$suspenseAccount.'&search_accountancy_code_end='.$suspenseAccount.'">' . $nbSuspenseAccount . '</a>',
|
||||
'text' => '<a href="' . DOL_URL_ROOT . '/accountancy/bookkeeping/list.php?search_accountancy_code_start='.urlencode($suspenseAccount).'&search_accountancy_code_end='.urlencode($suspenseAccount).'">' . $nbSuspenseAccount . '</a>',
|
||||
'asis' => 1
|
||||
);
|
||||
} else {
|
||||
|
||||
@ -151,6 +151,7 @@ function showDirectPublicLink($object)
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||
$email = CMailFile::getValidAddress($object->origin_email, 2);
|
||||
$url = '';
|
||||
if ($email)
|
||||
{
|
||||
$url = dol_buildpath('/public/ticket/view.php', 3).'?track_id='.$object->track_id.'&email='.$email;
|
||||
|
||||
@ -90,20 +90,23 @@ class InterfaceContactRoles extends DolibarrTriggers
|
||||
if (!empty($cloneFrom->id)) $TContactAlreadyLinked = array_merge($cloneFrom->liste_contact(-1, 'external'), $cloneFrom->liste_contact(-1, 'internal'));
|
||||
}
|
||||
|
||||
foreach($TContact as $i => $infos) {
|
||||
foreach ($TContactAlreadyLinked as $contactData) {
|
||||
if($contactData['id'] == $infos['fk_socpeople'] && $contactData['fk_c_type_contact'] == $infos['type_contact']) unset($TContact[$i]);
|
||||
if (is_array($TContact))
|
||||
{
|
||||
foreach($TContact as $i => $infos) {
|
||||
foreach ($TContactAlreadyLinked as $contactData) {
|
||||
if ($contactData['id'] == $infos['fk_socpeople'] && $contactData['fk_c_type_contact'] == $infos['type_contact']) unset($TContact[$i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$nb = 0;
|
||||
foreach($TContact as $infos) {
|
||||
$res = $object->add_contact($infos['fk_socpeople'], $infos['type_contact']);
|
||||
if($res > 0) $nb++;
|
||||
}
|
||||
$nb = 0;
|
||||
foreach($TContact as $infos) {
|
||||
$res = $object->add_contact($infos['fk_socpeople'], $infos['type_contact']);
|
||||
if ($res > 0) $nb++;
|
||||
}
|
||||
|
||||
if($nb > 0) {
|
||||
setEventMessages($langs->trans('ContactAddedAutomatically', $nb), null, 'mesgs');
|
||||
if($nb > 0) {
|
||||
setEventMessages($langs->trans('ContactAddedAutomatically', $nb), null, 'mesgs');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1609,7 +1609,7 @@ class Ticket extends CommonObject
|
||||
* @param array $filename_list List of files to attach (full path of filename on file system)
|
||||
* @param array $mimetype_list List of MIME type of attached files
|
||||
* @param array $mimefilename_list List of attached file name in message
|
||||
* @return void
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function createTicketMessage($user, $notrigger = 0, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array())
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user