Fix phpcs
This commit is contained in:
parent
7ffce2a28f
commit
f0a0c8c3e5
@ -54,8 +54,8 @@ class Ticketsup extends CommonObject
|
|||||||
* @var string String with name of icon for ticketsupcore. Must be the part after the 'object_' into object_ticketsupcore.png
|
* @var string String with name of icon for ticketsupcore. Must be the part after the 'object_' into object_ticketsupcore.png
|
||||||
*/
|
*/
|
||||||
public $picto = 'ticketsup@ticketsup';
|
public $picto = 'ticketsup@ticketsup';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Hash to identify ticket
|
* @var string Hash to identify ticket
|
||||||
*/
|
*/
|
||||||
@ -192,9 +192,9 @@ class Ticketsup extends CommonObject
|
|||||||
'date_read' => array('type'=>'datetime', 'label'=>'TicketReadOn', 'visible'=>-2, 'enabled'=>1, 'position'=>500, 'notnull'=>1),
|
'date_read' => array('type'=>'datetime', 'label'=>'TicketReadOn', 'visible'=>-2, 'enabled'=>1, 'position'=>500, 'notnull'=>1),
|
||||||
'date_close' => array('type'=>'datetime', 'label'=>'TicketCloseOn', 'visible'=>-2, 'enabled'=>1, 'position'=>500, 'notnull'=>1),
|
'date_close' => array('type'=>'datetime', 'label'=>'TicketCloseOn', 'visible'=>-2, 'enabled'=>1, 'position'=>500, 'notnull'=>1),
|
||||||
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'visible'=>-2, 'enabled'=>1, 'position'=>501, 'notnull'=>1)
|
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'visible'=>-2, 'enabled'=>1, 'position'=>501, 'notnull'=>1)
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
@ -1002,7 +1002,7 @@ class Ticketsup extends CommonObject
|
|||||||
$this->tms = '';
|
$this->tms = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function printSelectStatus($selected = "")
|
public function printSelectStatus($selected = "")
|
||||||
{
|
{
|
||||||
print Form::selectarray('search_fk_statut', $this->statuts_short, $selected, $show_empty = 1, $key_in_label = 0, $value_as_key = 0, $option = '', $translate = 1, $maxlen = 0, $disabled = 0, $sort = '', $morecss = '');
|
print Form::selectarray('search_fk_statut', $this->statuts_short, $selected, $show_empty = 1, $key_in_label = 0, $value_as_key = 0, $option = '', $translate = 1, $maxlen = 0, $disabled = 0, $sort = '', $morecss = '');
|
||||||
@ -1130,9 +1130,9 @@ class Ticketsup extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return status label of object
|
* Return status label of object
|
||||||
*
|
*
|
||||||
* @param mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
||||||
* @return string Label
|
* @return string Label
|
||||||
*/
|
*/
|
||||||
public function getLibStatut($mode = 0)
|
public function getLibStatut($mode = 0)
|
||||||
{
|
{
|
||||||
@ -1141,12 +1141,12 @@ class Ticketsup extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return status label of object
|
* Return status label of object
|
||||||
*
|
*
|
||||||
* @param string $statut id statut
|
* @param string $statut id statut
|
||||||
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
||||||
* @return string Label
|
* @return string Label
|
||||||
*/
|
*/
|
||||||
public function LibStatut($statut, $mode = 0)
|
function LibStatut($statut, $mode = 0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -1292,7 +1292,7 @@ class Ticketsup extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoie nom clicable (avec eventuellement le picto)
|
* Renvoie nom clicable (avec eventuellement le picto)
|
||||||
*
|
*
|
||||||
* @param int $withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
* @param int $withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
||||||
* @param string $option Sur quoi pointe le lien
|
* @param string $option Sur quoi pointe le lien
|
||||||
* @return string Chaine avec URL
|
* @return string Chaine avec URL
|
||||||
@ -1326,10 +1326,10 @@ class Ticketsup extends CommonObject
|
|||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mark a message as read
|
* Mark a message as read
|
||||||
*
|
*
|
||||||
* @param User $user Object user
|
* @param User $user Object user
|
||||||
* @param int $notrigger No trigger
|
* @param int $notrigger No trigger
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
@ -1340,7 +1340,7 @@ class Ticketsup extends CommonObject
|
|||||||
|
|
||||||
if ($this->statut != 9) { // no closed
|
if ($this->statut != 9) { // no closed
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "ticketsup";
|
$sql = "UPDATE " . MAIN_DB_PREFIX . "ticketsup";
|
||||||
$sql .= " SET fk_statut = 1, date_read='" . $this->db->idate(dol_now()) . "'";
|
$sql .= " SET fk_statut = 1, date_read='" . $this->db->idate(dol_now()) . "'";
|
||||||
$sql .= " WHERE rowid = " . $this->id;
|
$sql .= " WHERE rowid = " . $this->id;
|
||||||
@ -1378,7 +1378,7 @@ class Ticketsup extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Mark a message as read
|
* Mark a message as read
|
||||||
*
|
*
|
||||||
* @param User $user Object user
|
* @param User $user Object user
|
||||||
* @param int $id_assign_user ID of user assigned
|
* @param int $id_assign_user ID of user assigned
|
||||||
* @param int $notrigger Disable trigger
|
* @param int $notrigger Disable trigger
|
||||||
@ -1486,11 +1486,11 @@ class Ticketsup extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send notification of changes by email
|
* Send notification of changes by email
|
||||||
*
|
*
|
||||||
* @param User $user User that create
|
* @param User $user User that create
|
||||||
* @param string $message Log message
|
* @param string $log_message Log message
|
||||||
* @return int <0 if KO, >0 if OK (number of emails sent)
|
* @return int <0 if KO, >0 if OK (number of emails sent)
|
||||||
*/
|
*/
|
||||||
private function sendLogByEmail($user, $log_message)
|
private function sendLogByEmail($user, $log_message)
|
||||||
{
|
{
|
||||||
@ -1733,7 +1733,7 @@ class Ticketsup extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Close a ticket
|
* Close a ticket
|
||||||
*
|
*
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function close()
|
public function close()
|
||||||
@ -2099,7 +2099,7 @@ class Ticketsup extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Return id of all contacts for ticket
|
* Return id of all contacts for ticket
|
||||||
*
|
*
|
||||||
* @param int $exclude_self exclude_self Exclude current user form list
|
* @return array Array of contacts
|
||||||
*/
|
*/
|
||||||
public function getTicketAllCustomerContacts()
|
public function getTicketAllCustomerContacts()
|
||||||
{
|
{
|
||||||
@ -2114,9 +2114,9 @@ class Ticketsup extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Check if contact are linked to the ticket. If yes, send mail and save trace into llx_notify.
|
* Check if contact are linked to the ticket. If yes, send mail and save trace into llx_notify.
|
||||||
*
|
*
|
||||||
* @param string $subject Subject
|
* @param string $subject Subject
|
||||||
* @param string $texte Message to send
|
* @param string $texte Message to send
|
||||||
* @return int <0 if KO, or number of changes if OK
|
* @return int <0 if KO, or number of changes if OK
|
||||||
*/
|
*/
|
||||||
public function messageSend($subject, $texte)
|
public function messageSend($subject, $texte)
|
||||||
{
|
{
|
||||||
@ -2138,7 +2138,8 @@ class Ticketsup extends CommonObject
|
|||||||
$sendto = $obj->firstname . " " . $obj->lastname . " <" . $obj->email . ">";
|
$sendto = $obj->firstname . " " . $obj->lastname . " <" . $obj->email . ">";
|
||||||
$actiondefid = $obj->adid;
|
$actiondefid = $obj->adid;
|
||||||
|
|
||||||
if (dol_strlen($sendto)) {
|
if (dol_strlen($sendto))
|
||||||
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||||
$application = ($conf->global->MAIN_APPLICATION_TITLE ? $conf->global->MAIN_APPLICATION_TITLE : 'Dolibarr ERP/CRM');
|
$application = ($conf->global->MAIN_APPLICATION_TITLE ? $conf->global->MAIN_APPLICATION_TITLE : 'Dolibarr ERP/CRM');
|
||||||
|
|
||||||
@ -2239,12 +2240,13 @@ class Ticketsup extends CommonObject
|
|||||||
* Get array of all contacts for a ticket
|
* Get array of all contacts for a ticket
|
||||||
* Override method of file commonobject.class.php to add phone number
|
* Override method of file commonobject.class.php to add phone number
|
||||||
*
|
*
|
||||||
* @param int $statut Status of lines to get (-1=all)
|
* @param int $statut Status of lines to get (-1=all)
|
||||||
* @param string $source Source of contact: external or thirdparty (llx_socpeople) or internal (llx_user)
|
* @param string $source Source of contact: external or thirdparty (llx_socpeople) or internal (llx_user)
|
||||||
* @param int $list 0:Return array contains all properties, 1:Return array contains just id
|
* @param int $list 0:Return array contains all properties, 1:Return array contains just id
|
||||||
* @return array Array of contacts
|
* @param string $code Code
|
||||||
|
* @return array Array of contacts
|
||||||
*/
|
*/
|
||||||
public function liste_contact($statut = -1, $source = 'external', $list = 0, $code = '')
|
function liste_contact($statut = -1, $source = 'external', $list = 0, $code = '')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -2454,12 +2456,12 @@ class Ticketsup extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Affiche la premiere photo du ticket
|
* Return if at least one photo is available
|
||||||
*
|
*
|
||||||
* @param string $sdir Repertoire a scanner
|
* @param string $sdir Directory to scan
|
||||||
* @return boolean true si photo dispo, false sinon
|
* @return boolean True if at least one photo is available, False if not
|
||||||
*/
|
*/
|
||||||
public function is_photo_available($sdir)
|
function is_photo_available($sdir)
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||||
|
|
||||||
@ -2501,7 +2503,7 @@ class Ticketsup extends CommonObject
|
|||||||
* @param int $nolink Do not add a href link to view enlarged imaged into a new tab
|
* @param int $nolink Do not add a href link to view enlarged imaged into a new tab
|
||||||
* @return string Html code to show photo. Number of photos shown is saved in this->nbphoto
|
* @return string Html code to show photo. Number of photos shown is saved in this->nbphoto
|
||||||
*/
|
*/
|
||||||
public function show_photos($sdir, $size = 0, $nbmax = 0, $nbbyrow = 5, $showfilename = 0, $showaction = 0, $maxHeight = 120, $maxWidth = 160, $nolink = 0)
|
function show_photos($sdir, $size = 0, $nbmax = 0, $nbbyrow = 5, $showfilename = 0, $showaction = 0, $maxHeight = 120, $maxWidth = 160, $nolink = 0)
|
||||||
{
|
{
|
||||||
global $conf, $user, $langs;
|
global $conf, $user, $langs;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user