2018-03-10 04:23:59 +01:00
< ? php
2024-06-29 18:57:43 +02:00
/* Copyright ( C ) 2013 - 2018 Jean - François Ferry < hello @ librethic . io >
* Copyright ( C ) 2016 Christophe Battarel < christophe @ altairis . fr >
* Copyright ( C ) 2019 - 2024 Frédéric France < frederic . france @ free . fr >
* Copyright ( C ) 2020 Laurent Destailleur < eldy @ users . sourceforge . net >
* Copyright ( C ) 2023 Charlene Benke < charlene @ patas - monkey . com >
2024-08-07 00:42:53 +02:00
* Copyright ( C ) 2023 - 2024 Benjamin Falière < benjamin . faliere @ altairis . fr >
2024-06-29 18:57:43 +02:00
* Copyright ( C ) 2024 William Mead < william . mead @ manchenumerique . fr >
2025-02-03 11:24:16 +01:00
* Copyright ( C ) 2024 - 2025 MDW < mdeweerd @ users . noreply . github . com >
2018-03-10 04:23:59 +01:00
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
2019-09-23 21:55:30 +02:00
* along with this program . If not , see < https :// www . gnu . org / licenses />.
2018-03-10 04:23:59 +01:00
*/
/**
2018-06-04 21:49:29 +02:00
* \file ticket / class / ticket . class . php
* \ingroup ticket
* \brief Class file for object ticket
2018-03-10 04:23:59 +01:00
*/
// Put here all includes required by your class file
2019-11-13 19:35:02 +01:00
require_once DOL_DOCUMENT_ROOT . " /core/class/commonobject.class.php " ;
require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php' ;
require_once DOL_DOCUMENT_ROOT . '/core/lib/ticket.lib.php' ;
2018-03-10 04:23:59 +01:00
2018-03-11 10:34:21 +01:00
2018-03-10 04:23:59 +01:00
/**
2018-03-11 11:33:24 +01:00
* Class to manage ticket
2018-03-10 04:23:59 +01:00
*/
2018-06-04 21:49:29 +02:00
class Ticket extends CommonObject
2018-03-10 04:23:59 +01:00
{
2023-08-04 14:50:31 +02:00
/**
2024-01-13 15:50:02 +01:00
* @ var DoliDB Database handler
2023-08-04 14:50:31 +02:00
*/
2023-08-11 09:00:51 +02:00
public $db ;
2023-08-11 12:34:27 +02:00
2020-04-16 00:42:57 +02:00
/**
* @ var string ID to identify managed object
*/
public $element = 'ticket' ;
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
/**
* @ var string Name of table without prefix where object is stored
*/
public $table_element = 'ticket' ;
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
/**
* @ var string Name of field for link to tickets
*/
public $fk_element = 'fk_ticket' ;
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
/**
* @ var string String with name of icon for ticketcore . Must be the part after the 'object_' into object_ticketcore . png
*/
public $picto = 'ticket' ;
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
/**
2024-03-13 22:18:13 +01:00
* @ var ? string Hash to identify ticket publicly
2020-04-16 00:42:57 +02:00
*/
public $track_id ;
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
/**
2024-08-31 19:43:58 +02:00
* @ var int Third party ID
2020-04-16 00:42:57 +02:00
*/
public $fk_soc ;
2024-08-31 19:43:58 +02:00
/**
* @ var int Third party ID
*/
2023-08-05 14:59:31 +02:00
public $socid ;
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
/**
* @ var int Project ID
*/
public $fk_project ;
2018-03-10 04:23:59 +01:00
2023-08-05 19:30:14 +02:00
/**
* @ var int Contract ID
*/
public $fk_contract ;
2020-04-16 00:42:57 +02:00
/**
2024-03-13 22:18:13 +01:00
* @ var ? string Email of person who created the ticket
2020-04-16 00:42:57 +02:00
*/
public $origin_email ;
2018-03-12 12:54:48 +01:00
2020-04-16 00:42:57 +02:00
/**
2024-03-13 22:18:13 +01:00
* @ var int User id who created the ticket
2020-04-16 00:42:57 +02:00
*/
public $fk_user_create ;
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
/**
2024-03-13 22:18:13 +01:00
* @ var int User id who the ticket is assigned to
2020-04-16 00:42:57 +02:00
*/
public $fk_user_assign ;
/**
2024-10-19 01:21:41 +02:00
* @ var string Ticket subject
2020-04-16 00:42:57 +02:00
*/
public $subject ;
/**
* @ var string Ticket message
*/
public $message ;
2023-08-05 14:59:31 +02:00
/**
* @ var string Private message
*/
public $private ;
2020-04-16 00:42:57 +02:00
/**
2024-08-31 19:43:58 +02:00
* @ var int Ticket status
2022-09-08 20:48:05 +02:00
* @ deprecated use status
* @ see $status
2020-10-30 20:37:23 +01:00
*/
public $fk_statut ;
/**
2024-08-31 19:43:58 +02:00
* @ var int Ticket status
2020-04-16 00:42:57 +02:00
*/
2020-06-26 19:35:09 +02:00
public $status ;
2020-04-16 00:42:57 +02:00
/**
2024-06-29 18:57:43 +02:00
* @ var null | integer State resolution
2020-04-16 00:42:57 +02:00
*/
public $resolution ;
/**
* @ var int Progress in percent
*/
public $progress ;
/**
* @ var string Duration for ticket
*/
public $timing ;
/**
* @ var string Type code
*/
public $type_code ;
/**
* @ var string Category code
*/
public $category_code ;
/**
* @ var string Severity code
*/
public $severity_code ;
2020-10-31 14:32:18 +01:00
/**
2024-08-31 19:43:58 +02:00
* @ var string Type label
2020-10-31 14:32:18 +01:00
*/
public $type_label ;
/**
2024-08-31 19:43:58 +02:00
* @ var string Category label
2020-10-31 14:32:18 +01:00
*/
public $category_label ;
/**
2024-08-31 19:43:58 +02:00
* @ var string Severity label
2020-10-31 14:32:18 +01:00
*/
public $severity_label ;
/**
2024-08-31 19:43:58 +02:00
* @ var string Email from user
2020-10-31 14:32:18 +01:00
*/
public $email_from ;
2020-10-07 16:45:06 +02:00
2024-02-08 13:58:40 +01:00
/**
2024-08-31 19:43:58 +02:00
* @ var string Email to reply to
2024-02-08 13:58:40 +01:00
*/
public $origin_replyto ;
2024-03-18 15:11:50 +01:00
/**
2024-08-31 19:43:58 +02:00
* @ var string References from origin email
2024-03-18 15:11:50 +01:00
*/
public $origin_references ;
2020-04-16 00:42:57 +02:00
/**
2020-10-27 19:29:42 +01:00
* @ var int Creation date
2020-04-16 00:42:57 +02:00
*/
2024-01-31 22:37:40 +01:00
public $datec ;
2020-04-16 00:42:57 +02:00
/**
* @ var int Read date
*/
2024-01-31 22:37:40 +01:00
public $date_read ;
2020-04-16 00:42:57 +02:00
2022-02-04 16:14:41 +01:00
/**
* @ var int Last message date
*/
2024-01-31 22:37:40 +01:00
public $date_last_msg_sent ;
2022-02-04 16:14:41 +01:00
2020-04-16 00:42:57 +02:00
/**
* @ var int Close ticket date
*/
2024-01-31 22:37:40 +01:00
public $date_close ;
2020-04-16 00:42:57 +02:00
/**
2024-10-19 01:21:41 +02:00
* @ var array < int , array { code : string , label : string , use_default : int , pos : int } > cache_types_tickets
2020-04-16 00:42:57 +02:00
*/
public $cache_types_tickets ;
2023-02-06 23:24:06 +01:00
/**
2024-10-19 01:21:41 +02:00
* @ var array < int , array { private : 0 | 1 | '0' | '1' , fk_user_author : int , fk_contact_author ? : int , message : string } > cache msgs ticket
2023-02-06 23:24:06 +01:00
*/
public $cache_msgs_ticket ;
2020-04-16 00:42:57 +02:00
/**
2024-11-21 12:33:23 +01:00
* @ var int Save if a thirdparty was notified at creation at ticket or not
2020-04-16 00:42:57 +02:00
*/
public $notify_tiers_at_create ;
2020-10-30 20:37:23 +01:00
/**
2022-08-02 20:37:42 +02:00
* @ var string Email MSGID
2020-10-30 20:37:23 +01:00
*/
2020-08-21 01:11:22 +02:00
public $email_msgid ;
2022-08-02 20:37:42 +02:00
/**
2024-06-29 18:57:43 +02:00
* @ var null | int | '' Email Date
2022-08-02 20:37:42 +02:00
*/
public $email_date ;
2023-03-17 21:09:43 +01:00
/**
* @ var string IP address
*/
public $ip ;
2022-09-08 20:48:05 +02:00
/**
2024-10-19 01:21:41 +02:00
* @ var Ticket [] Array of Tickets
2022-09-08 20:48:05 +02:00
*/
2020-04-16 00:42:57 +02:00
public $lines ;
/**
* @ var string Regex pour les images
*/
2022-08-02 20:37:42 +02:00
public $regeximgext = '\.gif|\.jpg|\.jpeg|\.png|\.bmp|\.webp|\.xpm|\.xbm' ; // See also into images.lib.php
2020-04-16 00:42:57 +02:00
2020-08-20 19:00:43 +02:00
/**
* Status
*/
2024-02-16 13:35:26 +01:00
const STATUS_NOT_READ = 0 ; // Draft. Not take into account yet.
const STATUS_READ = 1 ; // Ticket was read.
const STATUS_ASSIGNED = 2 ; // Ticket was just assigned to someone. Not in progress yet.
const STATUS_IN_PROGRESS = 3 ; // In progress
const STATUS_NEED_MORE_INFO = 5 ; // Waiting requester feedback
const STATUS_WAITING = 7 ; // On hold
2021-07-30 00:40:06 +02:00
const STATUS_CLOSED = 8 ; // Closed - Solved
const STATUS_CANCELED = 9 ; // Closed - Not solved
2020-08-20 19:00:43 +02:00
/**
2021-02-02 00:19:41 +01:00
* 'type' field format ( 'integer' , 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]' , 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter]]]' , 'varchar(x)' , 'double(24,8)' , 'real' , 'price' , 'text' , 'text:none' , 'html' , 'date' , 'datetime' , 'timestamp' , 'duration' , 'mail' , 'phone' , 'url' , 'password' )
2020-08-20 19:00:43 +02:00
* Note : Filter can be a string like " (t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL) "
* 'label' the translation key .
2021-02-02 00:19:41 +01:00
* 'picto' is code of a picto to show before value in forms
2024-02-27 00:09:35 +01:00
* 'enabled' is a condition when the field must be managed ( Example : 1 or 'getDolGlobalString(' MY_SETUP_PARAM ' ))
2020-08-20 19:00:43 +02:00
* 'position' is the sort order of field .
* 'notnull' is set to 1 if not null in database . Set to - 1 if we must set data to null if empty ( '' or 0 ) .
* 'visible' says if field is visible in list ( Examples : 0 = Not visible , 1 = Visible on list and create / update / view forms , 2 = Visible on list only , 3 = Visible on create / update / view form only ( not list ), 4 = Visible on list and update / view form only ( not create ) . 5 = Visible on list and view only ( not create / not update ) . Using a negative value means field is not shown by default on list but can be selected for viewing )
* 'noteditable' says if field is not editable ( 1 or 0 )
* 'default' is a default value for creation ( can still be overwrote by the Setup of Default Values if field is editable in creation form ) . Note : If default is set to '(PROV)' and field is 'ref' , the default value will be set to '(PROVid)' where id is rowid when a new record is created .
* 'index' if we want an index in database .
2024-01-12 17:18:52 +01:00
* 'foreignkey' => 'tablename.field' if the field is a foreign key ( it is recommended to name the field fk_ ... ) .
2020-08-20 19:00:43 +02:00
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button .
* 'isameasure' must be set to 1 if you want to have a total on list for this field . Field type must be summable like integer or double ( 24 , 8 ) .
2021-02-02 00:19:41 +01:00
* 'css' and 'cssview' and 'csslist' is the CSS style to use on field . 'css' is used in creation and update . 'cssview' is used in view mode . 'csslist' is used for columns in lists . For example : 'maxwidth200' , 'wordbreak' , 'tdoverflowmax200'
* 'help' is a 'TranslationString' to use to show a tooltip on field . You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click .
2020-08-20 19:00:43 +02:00
* 'showoncombobox' if value of the field must be visible into the label of the combobox that list record
* 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute . In most cases , this is never set into the definition of $fields into class , but is set dynamically by some part of code .
2021-04-29 12:10:55 +02:00
* 'arrayofkeyval' to set list of value if type is a list of predefined values . For example : array ( " 0 " => " Draft " , " 1 " => " Active " , " -1 " => " Cancel " )
2020-08-20 19:00:43 +02:00
* 'autofocusoncreate' to have field having the focus on a create form . Only 1 field should have this property set to 1.
* 'comment' is not used . You can store here any text of your choice . It is not used by application .
*
* Note : To have value dynamic , you can set value to 0 in definition and edit the value on the fly into the constructor .
*/
// BEGIN MODULEBUILDER PROPERTIES
2020-04-16 00:42:57 +02:00
public $fields = array (
2024-03-11 12:55:55 +01:00
'rowid' => array ( 'type' => 'integer' , 'label' => 'TechnicalID' , 'visible' => - 2 , 'enabled' => 1 , 'position' => 1 , 'notnull' => 1 , 'index' => 1 , 'comment' => " Id " ),
'entity' => array ( 'type' => 'integer' , 'label' => 'Entity' , 'visible' => 0 , 'enabled' => 1 , 'position' => 5 , 'notnull' => 1 , 'index' => 1 ),
'ref' => array ( 'type' => 'varchar(128)' , 'label' => 'Ref' , 'visible' => 1 , 'enabled' => 1 , 'position' => 10 , 'notnull' => 1 , 'index' => 1 , 'searchall' => 1 , 'comment' => " Reference of object " , 'css' => '' , 'showoncombobox' => 1 ),
'track_id' => array ( 'type' => 'varchar(255)' , 'label' => 'TicketTrackId' , 'visible' => - 2 , 'enabled' => 1 , 'position' => 11 , 'notnull' => - 1 , 'searchall' => 1 , 'help' => " Help text " ),
'fk_user_create' => array ( 'type' => 'integer:User:user/class/user.class.php' , 'label' => 'Author' , 'visible' => 1 , 'enabled' => 1 , 'position' => 15 , 'notnull' => 1 , 'csslist' => 'tdoverflowmax100 maxwidth150onsmartphone' ),
'origin_email' => array ( 'type' => 'mail' , 'label' => 'OriginEmail' , 'visible' => - 2 , 'enabled' => 1 , 'position' => 16 , 'notnull' => 1 , 'index' => 1 , 'searchall' => 1 , 'comment' => " Reference of object " , 'csslist' => 'tdoverflowmax150' ),
'origin_replyto' => array ( 'type' => 'mail' , 'label' => 'EmailReplyto' , 'visible' => - 2 , 'enabled' => 1 , 'position' => 17 , 'notnull' => 1 , 'index' => 1 , 'searchall' => 1 , 'comment' => " Email to reply to " , 'csslist' => 'tdoverflowmax150' ),
2024-03-19 01:52:57 +01:00
'origin_references' => array ( 'type' => 'text' , 'label' => 'EmailReferences' , 'visible' => - 2 , 'enabled' => 1 , 'position' => 18 , 'notnull' => 1 , 'index' => 1 , 'searchall' => 1 , 'comment' => " References from origin email " , 'csslist' => 'tdoverflowmax150' ),
2024-08-07 01:20:43 +02:00
'subject' => array ( 'type' => 'varchar(255)' , 'label' => 'Subject' , 'visible' => 1 , 'enabled' => 1 , 'position' => 19 , 'notnull' => - 1 , 'searchall' => 1 , 'help' => " " , 'css' => 'maxwidth200 tdoverflowmax200' , 'csslist' => 'tdoverflowmax250' , 'autofocusoncreate' => 1 ),
2024-06-27 00:30:26 +02:00
'type_code' => array ( 'type' => 'varchar(32)' , 'label' => 'Type' , 'visible' => 1 , 'enabled' => 1 , 'position' => 20 , 'notnull' => - 1 , 'help' => " " , 'csslist' => 'tdoverflowmax100' ),
2024-03-11 12:55:55 +01:00
'category_code' => array ( 'type' => 'varchar(32)' , 'label' => 'TicketCategory' , 'visible' => - 1 , 'enabled' => 1 , 'position' => 21 , 'notnull' => - 1 , 'help' => " " , 'css' => 'maxwidth100 tdoverflowmax200' ),
'severity_code' => array ( 'type' => 'varchar(32)' , 'label' => 'Severity' , 'visible' => 1 , 'enabled' => 1 , 'position' => 22 , 'notnull' => - 1 , 'help' => " " , 'css' => 'maxwidth100' ),
'fk_soc' => array ( 'type' => 'integer:Societe:societe/class/societe.class.php' , 'label' => 'ThirdParty' , 'visible' => 1 , 'enabled' => 'isModEnabled("societe")' , 'position' => 50 , 'notnull' => - 1 , 'index' => 1 , 'searchall' => 1 , 'help' => " OrganizationEventLinkToThirdParty " , 'css' => 'tdoverflowmax150 maxwidth150onsmartphone' ),
'notify_tiers_at_create' => array ( 'type' => 'integer' , 'label' => 'NotifyThirdparty' , 'visible' => - 1 , 'enabled' => 0 , 'position' => 51 , 'notnull' => 1 , 'index' => 1 ),
'fk_project' => array ( 'type' => 'integer:Project:projet/class/project.class.php' , 'label' => 'Project' , 'visible' => - 1 , 'enabled' => '$conf->project->enabled' , 'position' => 52 , 'notnull' => - 1 , 'index' => 1 , 'help' => " LinkToProject " ),
'fk_contract' => array ( 'type' => 'integer:Contrat:contrat/class/contrat.class.php' , 'label' => 'Contract' , 'visible' => - 1 , 'enabled' => '$conf->contract->enabled' , 'position' => 53 , 'notnull' => - 1 , 'index' => 1 , 'help' => " LinkToContract " ),
2021-10-19 16:26:43 +02:00
//'timing' => array('type'=>'varchar(20)', 'label'=>'Timing', 'visible'=>-1, 'enabled'=>1, 'position'=>42, 'notnull'=>-1, 'help'=>""), // what is this ?
2024-03-11 12:55:55 +01:00
'datec' => array ( 'type' => 'datetime' , 'label' => 'DateCreation' , 'visible' => 1 , 'enabled' => 1 , 'position' => 500 , 'notnull' => 1 , 'csslist' => 'nowraponall' ),
2024-06-05 14:00:49 +02:00
'tms' => array ( 'type' => 'timestamp' , 'label' => 'DateModification' , 'visible' => - 1 , 'enabled' => 1 , 'position' => 501 , 'notnull' => 1 ),
'date_read' => array ( 'type' => 'datetime' , 'label' => 'DateReading' , 'visible' => - 1 , 'enabled' => 1 , 'position' => 505 , 'notnull' => 1 , 'csslist' => 'nowraponall' ),
'date_last_msg_sent' => array ( 'type' => 'datetime' , 'label' => 'TicketLastMessageDate' , 'visible' => 0 , 'enabled' => 1 , 'position' => 506 , 'notnull' => - 1 ),
'fk_user_assign' => array ( 'type' => 'integer:User:user/class/user.class.php' , 'label' => 'AssignedTo' , 'visible' => 1 , 'enabled' => 1 , 'position' => 507 , 'notnull' => 1 , 'csslist' => 'tdoverflowmax100 maxwidth150onsmartphone' ),
2024-03-11 12:55:55 +01:00
'date_close' => array ( 'type' => 'datetime' , 'label' => 'TicketCloseOn' , 'visible' => - 1 , 'enabled' => 1 , 'position' => 510 , 'notnull' => 1 ),
'message' => array ( 'type' => 'html' , 'label' => 'Message' , 'visible' => - 2 , 'enabled' => 1 , 'position' => 540 , 'notnull' => - 1 ,),
'email_msgid' => array ( 'type' => 'varchar(255)' , 'label' => 'EmailMsgID' , 'visible' => - 2 , 'enabled' => 1 , 'position' => 540 , 'notnull' => - 1 , 'help' => 'EmailMsgIDDesc' , 'csslist' => 'tdoverflowmax100' ),
'email_date' => array ( 'type' => 'datetime' , 'label' => 'EmailDate' , 'visible' => - 2 , 'enabled' => 1 , 'position' => 541 ),
2024-08-21 13:23:35 +02:00
'progress' => array ( 'type' => 'integer' , 'label' => 'Progression' , 'visible' => - 1 , 'enabled' => 1 , 'position' => 540 , 'notnull' => - 1 , 'css' => 'right' , 'help' => " " , 'isameasure' => 1 , 'csslist' => 'width50' ),
2024-03-11 12:55:55 +01:00
'resolution' => array ( 'type' => 'integer' , 'label' => 'Resolution' , 'visible' => - 1 , 'enabled' => 'getDolGlobalString("TICKET_ENABLE_RESOLUTION")' , 'position' => 550 , 'notnull' => 1 ),
'model_pdf' => array ( 'type' => 'varchar(255)' , 'label' => 'PDFTemplate' , 'enabled' => 1 , 'visible' => 0 , 'position' => 560 ),
2024-11-28 15:43:47 +01:00
'extraparams' => array ( 'type' => 'varchar(255)' , 'label' => 'Extraparams' , 'enabled' => 1 , 'visible' => 0 , 'position' => 570 ),
2024-03-11 12:55:55 +01:00
'fk_statut' => array ( 'type' => 'integer' , 'label' => 'Status' , 'visible' => 1 , 'enabled' => 1 , 'position' => 600 , 'notnull' => 1 , 'index' => 1 , 'arrayofkeyval' => array ( 0 => 'Unread' , 1 => 'Read' , 2 => 'Assigned' , 3 => 'InProgress' , 5 => 'NeedMoreInformation' , 7 => 'OnHold' , 8 => 'SolvedClosed' , 9 => 'Deleted' )),
'import_key' => array ( 'type' => 'varchar(14)' , 'label' => 'ImportId' , 'enabled' => 1 , 'visible' => - 2 , 'position' => 900 ),
2020-04-16 00:42:57 +02:00
);
2020-08-20 19:00:43 +02:00
// END MODULEBUILDER PROPERTIES
2020-04-16 00:42:57 +02:00
/**
* Constructor
*
2024-01-13 15:50:02 +01:00
* @ param DoliDB $db Database handler
2020-04-16 00:42:57 +02:00
*/
2024-08-31 19:43:58 +02:00
public function __construct ( DoliDB $db )
2020-04-16 00:42:57 +02:00
{
$this -> db = $db ;
2024-05-05 00:34:19 +02:00
$this -> ismultientitymanaged = 1 ;
$this -> isextrafieldmanaged = 1 ;
2023-11-24 10:10:24 +01:00
$this -> labelStatusShort = array (
2020-10-30 20:37:23 +01:00
self :: STATUS_NOT_READ => 'Unread' ,
self :: STATUS_READ => 'Read' ,
self :: STATUS_ASSIGNED => 'Assigned' ,
self :: STATUS_IN_PROGRESS => 'InProgress' ,
2021-06-26 16:10:56 +02:00
self :: STATUS_NEED_MORE_INFO => 'NeedMoreInformationShort' ,
2024-02-07 23:49:36 +01:00
self :: STATUS_WAITING => 'OnHold' ,
2021-07-30 00:40:06 +02:00
self :: STATUS_CLOSED => 'SolvedClosed' ,
2020-10-30 20:37:23 +01:00
self :: STATUS_CANCELED => 'Canceled'
);
2023-11-24 10:10:24 +01:00
$this -> labelStatus = array (
2020-10-30 20:37:23 +01:00
self :: STATUS_NOT_READ => 'Unread' ,
self :: STATUS_READ => 'Read' ,
self :: STATUS_ASSIGNED => 'Assigned' ,
self :: STATUS_IN_PROGRESS => 'InProgress' ,
self :: STATUS_NEED_MORE_INFO => 'NeedMoreInformation' ,
2024-02-07 23:49:36 +01:00
self :: STATUS_WAITING => 'OnHold' ,
2021-07-30 00:40:06 +02:00
self :: STATUS_CLOSED => 'SolvedClosed' ,
2020-10-30 20:37:23 +01:00
self :: STATUS_CANCELED => 'Canceled'
);
2024-02-07 23:49:36 +01:00
if ( ! getDolGlobalString ( 'TICKET_INCLUDE_SUSPENDED_STATUS' )) {
unset ( $this -> fields [ 'fk_statut' ][ 'arrayofkeyval' ][ self :: STATUS_WAITING ]);
unset ( $this -> labelStatusShort [ self :: STATUS_WAITING ]);
unset ( $this -> labelStatus [ self :: STATUS_WAITING ]);
}
2020-04-16 00:42:57 +02:00
}
/**
* Check properties of ticket are ok ( like ref , track_id , ... ) .
* All properties must be already loaded on object ( this -> ref , this -> track_id , ... ) .
*
* @ return int 0 if OK , < 0 if KO
*/
private function verify ()
{
$this -> errors = array ();
$result = 0 ;
// Clean parameters
if ( isset ( $this -> ref )) {
$this -> ref = trim ( $this -> ref );
}
if ( isset ( $this -> track_id )) {
$this -> track_id = trim ( $this -> track_id );
}
if ( isset ( $this -> fk_soc )) {
$this -> fk_soc = ( int ) $this -> fk_soc ;
}
if ( isset ( $this -> fk_project )) {
$this -> fk_project = ( int ) $this -> fk_project ;
}
if ( isset ( $this -> origin_email )) {
$this -> origin_email = trim ( $this -> origin_email );
}
if ( isset ( $this -> fk_user_create )) {
$this -> fk_user_create = ( int ) $this -> fk_user_create ;
}
if ( isset ( $this -> fk_user_assign )) {
$this -> fk_user_assign = ( int ) $this -> fk_user_assign ;
}
if ( isset ( $this -> subject )) {
$this -> subject = trim ( $this -> subject );
}
if ( isset ( $this -> message )) {
$this -> message = trim ( $this -> message );
2022-12-15 15:05:29 +01:00
if ( dol_strlen ( $this -> message ) > 65000 ) {
$this -> errors [] = 'ErrorFieldTooLong' ;
dol_syslog ( get_class ( $this ) . '::create error -1 message too long' , LOG_ERR );
$result = - 1 ;
}
2020-04-16 00:42:57 +02:00
}
2024-06-29 18:57:43 +02:00
if ( isset ( $this -> status )) {
$this -> status = ( int ) $this -> status ;
2020-04-16 00:42:57 +02:00
}
if ( isset ( $this -> resolution )) {
2024-06-29 18:57:43 +02:00
$this -> resolution = ( int ) $this -> resolution ;
2020-04-16 00:42:57 +02:00
}
if ( isset ( $this -> progress )) {
2024-01-31 22:37:40 +01:00
$this -> progress = ( int ) $this -> progress ;
2020-04-16 00:42:57 +02:00
}
if ( isset ( $this -> timing )) {
$this -> timing = trim ( $this -> timing );
}
if ( isset ( $this -> type_code )) {
$this -> type_code = trim ( $this -> type_code );
}
if ( isset ( $this -> category_code )) {
$this -> category_code = trim ( $this -> category_code );
}
if ( isset ( $this -> severity_code )) {
$this -> severity_code = trim ( $this -> severity_code );
}
if ( empty ( $this -> ref )) {
$this -> errors [] = 'ErrorTicketRefRequired' ;
dol_syslog ( get_class ( $this ) . " ::create error -1 ref null " , LOG_ERR );
$result = - 1 ;
}
return $result ;
}
2024-04-27 12:43:04 +02:00
/**
* Check if ref exists or not
*
* @ param string $action Action
* @ param string $getRef Reference of object
* @ return bool
*/
2024-08-14 01:24:55 +02:00
public function checkExistingRef ( string $action , string $getRef )
2024-04-27 12:43:04 +02:00
{
$test = new self ( $this -> db );
2024-10-19 01:21:41 +02:00
if ( $test -> fetch ( 0 , $getRef ) > 0 ) {
2024-04-27 12:43:04 +02:00
if (( $action == 'add' ) || ( $action == 'update' && $this -> ref != $getRef )) {
return true ;
}
}
$this -> ref = $getRef ;
return false ;
}
2020-04-16 00:42:57 +02:00
/**
* Create object into database
*
* @ param User $user User that creates
* @ param int $notrigger 0 = launch triggers after , 1 = disable triggers
2023-12-01 19:51:32 +01:00
* @ return int Return integer < 0 if KO , Id of created object if OK
2020-04-16 00:42:57 +02:00
*/
public function create ( $user , $notrigger = 0 )
{
2023-06-27 01:08:48 +02:00
global $conf ;
2020-04-16 00:42:57 +02:00
$error = 0 ;
// Clean parameters
$this -> datec = dol_now ();
2021-02-26 13:27:00 +01:00
if ( empty ( $this -> track_id )) {
$this -> track_id = generate_random_id ( 16 );
}
2020-04-16 00:42:57 +02:00
// Check more parameters
// If error, this->errors[] is filled
$result = $this -> verify ();
if ( $result >= 0 ) {
2024-11-28 12:11:50 +01:00
// setEntity will set entity with the right value if empty or change it for the right value if multicompany module is active
$this -> entity = setEntity ( $this );
2023-06-24 11:52:02 +02:00
2020-04-16 00:42:57 +02:00
// Insert request
$sql = " INSERT INTO " . MAIN_DB_PREFIX . " ticket( " ;
$sql .= " ref, " ;
$sql .= " track_id, " ;
$sql .= " fk_soc, " ;
$sql .= " fk_project, " ;
2023-08-04 10:40:02 +02:00
$sql .= " fk_contract, " ;
2020-04-16 00:42:57 +02:00
$sql .= " origin_email, " ;
2024-02-08 13:58:40 +01:00
$sql .= " origin_replyto, " ;
2024-03-18 15:11:50 +01:00
$sql .= " origin_references, " ;
2020-04-16 00:42:57 +02:00
$sql .= " fk_user_create, " ;
$sql .= " fk_user_assign, " ;
2020-08-21 01:11:22 +02:00
$sql .= " email_msgid, " ;
2022-08-02 20:37:42 +02:00
$sql .= " email_date, " ;
2020-04-16 00:42:57 +02:00
$sql .= " subject, " ;
$sql .= " message, " ;
$sql .= " fk_statut, " ;
$sql .= " resolution, " ;
$sql .= " progress, " ;
$sql .= " timing, " ;
$sql .= " type_code, " ;
$sql .= " category_code, " ;
$sql .= " severity_code, " ;
$sql .= " datec, " ;
$sql .= " date_read, " ;
$sql .= " date_close, " ;
$sql .= " entity, " ;
2022-08-04 16:53:58 +02:00
$sql .= " notify_tiers_at_create, " ;
2024-02-07 19:36:23 +01:00
$sql .= " model_pdf, " ;
2022-08-04 16:53:58 +02:00
$sql .= " ip " ;
2020-04-16 00:42:57 +02:00
$sql .= " ) VALUES ( " ;
$sql .= " " . ( ! isset ( $this -> ref ) ? '' : " ' " . $this -> db -> escape ( $this -> ref ) . " ' " ) . " , " ;
$sql .= " " . ( ! isset ( $this -> track_id ) ? 'NULL' : " ' " . $this -> db -> escape ( $this -> track_id ) . " ' " ) . " , " ;
2024-04-02 13:18:38 +02:00
$sql .= " " . ( $this -> fk_soc > 0 ? (( int ) $this -> fk_soc ) : " null " ) . " , " ;
$sql .= " " . ( $this -> fk_project > 0 ? (( int ) $this -> fk_project ) : " null " ) . " , " ;
$sql .= " " . ( $this -> fk_contract > 0 ? (( int ) $this -> fk_contract ) : " null " ) . " , " ;
2020-04-16 00:42:57 +02:00
$sql .= " " . ( ! isset ( $this -> origin_email ) ? 'NULL' : " ' " . $this -> db -> escape ( $this -> origin_email ) . " ' " ) . " , " ;
2024-02-08 13:58:40 +01:00
$sql .= " " . ( ! isset ( $this -> origin_replyto ) ? 'NULL' : " ' " . $this -> db -> escape ( $this -> origin_replyto ) . " ' " ) . " , " ;
2024-03-18 15:11:50 +01:00
$sql .= " " . ( ! isset ( $this -> origin_references ) ? 'NULL' : " ' " . $this -> db -> escape ( $this -> origin_references ) . " ' " ) . " , " ;
2024-04-02 13:18:38 +02:00
$sql .= " " . ( ! isset ( $this -> fk_user_create ) ? ( $user -> id > 0 ? (( int ) $user -> id ) : 'NULL' ) : ( $this -> fk_user_create > 0 ? (( int ) $this -> fk_user_create ) : 'NULL' )) . " , " ;
$sql .= " " . ( $this -> fk_user_assign > 0 ? (( int ) $this -> fk_user_assign ) : 'NULL' ) . " , " ;
2020-08-21 01:11:22 +02:00
$sql .= " " . ( empty ( $this -> email_msgid ) ? 'NULL' : " ' " . $this -> db -> escape ( $this -> email_msgid ) . " ' " ) . " , " ;
2024-06-29 18:57:43 +02:00
$sql .= " " . ( ! isDolTms ( $this -> email_date ) ? 'NULL' : " ' " . $this -> db -> idate ( $this -> email_date ) . " ' " ) . " , " ;
2020-04-16 00:42:57 +02:00
$sql .= " " . ( ! isset ( $this -> subject ) ? 'NULL' : " ' " . $this -> db -> escape ( $this -> subject ) . " ' " ) . " , " ;
$sql .= " " . ( ! isset ( $this -> message ) ? 'NULL' : " ' " . $this -> db -> escape ( $this -> message ) . " ' " ) . " , " ;
2024-04-22 18:57:21 +02:00
$sql .= " " . ( ! isset ( $this -> status ) ? '0' : (( int ) $this -> status )) . " , " ;
2024-04-02 13:18:38 +02:00
$sql .= " " . ( ! isset ( $this -> resolution ) ? 'NULL' : (( int ) $this -> resolution )) . " , " ;
$sql .= " " . ( ! isset ( $this -> progress ) ? '0' : (( int ) $this -> progress )) . " , " ;
2020-04-16 00:42:57 +02:00
$sql .= " " . ( ! isset ( $this -> timing ) ? 'NULL' : " ' " . $this -> db -> escape ( $this -> timing ) . " ' " ) . " , " ;
$sql .= " " . ( ! isset ( $this -> type_code ) ? 'NULL' : " ' " . $this -> db -> escape ( $this -> type_code ) . " ' " ) . " , " ;
2021-07-30 01:42:52 +02:00
$sql .= " " . ( empty ( $this -> category_code ) || $this -> category_code == '-1' ? 'NULL' : " ' " . $this -> db -> escape ( $this -> category_code ) . " ' " ) . " , " ;
2020-04-16 00:42:57 +02:00
$sql .= " " . ( ! isset ( $this -> severity_code ) ? 'NULL' : " ' " . $this -> db -> escape ( $this -> severity_code ) . " ' " ) . " , " ;
2024-06-29 18:57:43 +02:00
$sql .= " " . ( ! isDolTms ( $this -> datec ) ? 'NULL' : " ' " . $this -> db -> idate ( $this -> datec ) . " ' " ) . " , " ;
2024-09-13 17:40:03 +02:00
$sql .= " " . ( ! isset ( $this -> date_read ) || dol_strlen (( string ) $this -> date_read ) == 0 ? 'NULL' : " ' " . $this -> db -> idate ( $this -> date_read ) . " ' " ) . " , " ;
$sql .= " " . ( ! isset ( $this -> date_close ) || dol_strlen (( string ) $this -> date_close ) == 0 ? 'NULL' : " ' " . $this -> db -> idate ( $this -> date_close ) . " ' " );
2023-06-23 14:00:59 +02:00
$sql .= " , " . (( int ) $this -> entity );
2024-04-02 13:18:38 +02:00
$sql .= " , " . ( ! isset ( $this -> notify_tiers_at_create ) ? 1 : (( int ) $this -> notify_tiers_at_create ));
2024-02-07 19:36:23 +01:00
$sql .= " , ' " . $this -> db -> escape ( $this -> model_pdf ) . " ' " ;
2022-08-05 12:34:16 +02:00
$sql .= " , " . ( ! isset ( $this -> ip ) ? 'NULL' : " ' " . $this -> db -> escape ( $this -> ip ) . " ' " );
2020-04-16 00:42:57 +02:00
$sql .= " ) " ;
$this -> db -> begin ();
2021-08-27 22:42:04 +02:00
dol_syslog ( get_class ( $this ) . " ::create " , LOG_DEBUG );
2020-04-16 00:42:57 +02:00
$resql = $this -> db -> query ( $sql );
if ( ! $resql ) {
$error ++ ;
$this -> errors [] = " Error " . $this -> db -> lasterror ();
}
if ( ! $error ) {
$this -> id = $this -> db -> last_insert_id ( MAIN_DB_PREFIX . " ticket " );
}
2024-02-21 18:08:35 +01:00
if ( ! $error && getDolGlobalString ( 'TICKET_ADD_AUTHOR_AS_CONTACT' ) && empty ( $this -> context [ " createdfrompublicinterface " ])) {
2021-11-17 16:52:04 +01:00
// add creator as contributor
2024-02-21 18:08:35 +01:00
// We first check the type of contact (internal or external)
if ( ! empty ( $user -> socid ) && ! empty ( $user -> contact_id ) && getDolGlobalInt ( 'TICKET_ADD_AUTHOR_AS_CONTACT' ) == 2 ) {
$contact_type = 'external' ;
$contributor_id = $user -> contact_id ;
} else {
$contact_type = 'internal' ;
$contributor_id = $user -> id ;
}
// We add the creator as contributor
if ( $this -> add_contact ( $contributor_id , 'CONTRIBUTOR' , $contact_type ) < 0 ) {
2021-11-17 16:52:04 +01:00
$error ++ ;
}
}
2022-06-07 14:31:22 +02:00
if ( ! $error && $this -> fk_user_assign > 0 ) {
if ( $this -> add_contact ( $this -> fk_user_assign , 'SUPPORTTEC' , 'internal' ) < 0 ) {
$error ++ ;
}
}
2020-04-16 00:42:57 +02:00
//Update extrafield
if ( ! $error ) {
2020-04-23 13:21:39 +02:00
$result = $this -> insertExtraFields ();
if ( $result < 0 ) {
$error ++ ;
2020-04-16 00:42:57 +02:00
}
}
2022-05-11 11:19:55 +02:00
if ( ! $error && ! $notrigger ) {
// Call trigger
$result = $this -> call_trigger ( 'TICKET_CREATE' , $user );
if ( $result < 0 ) {
$error ++ ;
}
// End call triggers
}
2020-04-16 00:42:57 +02:00
// Commit or rollback
if ( $error ) {
foreach ( $this -> errors as $errmsg ) {
dol_syslog ( get_class ( $this ) . " ::create " . $errmsg , LOG_ERR );
$this -> error .= ( $this -> error ? ', ' . $errmsg : $errmsg );
}
$this -> db -> rollback ();
return - 1 * $error ;
} else {
$this -> db -> commit ();
return $this -> id ;
}
} else {
$this -> db -> rollback ();
Qual: Apply automatic phan fixes (deprecations, unneeded imports) (#28154)
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
2024-02-13 21:46:12 +01:00
dol_syslog ( get_class ( $this ) . " ::Create fails verify " . implode ( ',' , $this -> errors ), LOG_WARNING );
2020-04-16 00:42:57 +02:00
return - 3 ;
}
}
/**
* Load object in memory from the database
*
2020-08-23 18:04:52 +02:00
* @ param int $id Id object
* @ param string $ref Ref
* @ param string $track_id Track id , a hash like ref
* @ param string $email_msgid Email msgid
2023-12-01 19:51:32 +01:00
* @ return int Return integer < 0 if KO , > 0 if OK
2020-04-16 00:42:57 +02:00
*/
2024-01-12 17:07:22 +01:00
public function fetch ( $id = 0 , $ref = '' , $track_id = '' , $email_msgid = '' )
2020-04-16 00:42:57 +02:00
{
global $langs ;
// Check parameters
2021-06-14 20:06:52 +02:00
if ( empty ( $id ) && empty ( $ref ) && empty ( $track_id ) && empty ( $email_msgid )) {
2020-04-16 00:42:57 +02:00
$this -> error = 'ErrorWrongParameters' ;
2024-01-20 09:22:38 +01:00
dol_print_error ( null , get_class ( $this ) . " ::fetch " . $this -> error );
2020-04-16 00:42:57 +02:00
return - 1 ;
}
$sql = " SELECT " ;
$sql .= " t.rowid, " ;
2020-08-21 01:11:22 +02:00
$sql .= " t.entity, " ;
2020-04-16 00:42:57 +02:00
$sql .= " t.ref, " ;
$sql .= " t.track_id, " ;
$sql .= " t.fk_soc, " ;
$sql .= " t.fk_project, " ;
2023-08-04 14:50:31 +02:00
$sql .= " t.fk_contract, " ;
2020-04-16 00:42:57 +02:00
$sql .= " t.origin_email, " ;
2024-02-08 13:58:40 +01:00
$sql .= " t.origin_replyto, " ;
2024-03-18 15:11:50 +01:00
$sql .= " t.origin_references, " ;
2020-04-16 00:42:57 +02:00
$sql .= " t.fk_user_create, " ;
$sql .= " t.fk_user_assign, " ;
2020-08-21 01:11:22 +02:00
$sql .= " t.email_msgid, " ;
2022-08-02 20:37:42 +02:00
$sql .= " t.email_date, " ;
2020-04-16 00:42:57 +02:00
$sql .= " t.subject, " ;
$sql .= " t.message, " ;
2020-06-26 19:35:09 +02:00
$sql .= " t.fk_statut as status, " ;
2020-04-16 00:42:57 +02:00
$sql .= " t.resolution, " ;
$sql .= " t.progress, " ;
$sql .= " t.timing, " ;
$sql .= " t.type_code, " ;
$sql .= " t.category_code, " ;
$sql .= " t.severity_code, " ;
$sql .= " t.datec, " ;
$sql .= " t.date_read, " ;
2022-02-04 16:14:41 +01:00
$sql .= " t.date_last_msg_sent, " ;
2020-04-16 00:42:57 +02:00
$sql .= " t.date_close, " ;
2022-01-02 18:22:18 +01:00
$sql .= " t.tms, " ;
2024-02-07 19:36:23 +01:00
$sql .= " t.model_pdf, " ;
$sql .= " t.extraparams, " ;
2023-03-17 21:09:43 +01:00
$sql .= " t.ip, " ;
2022-01-02 18:22:18 +01:00
$sql .= " type.label as type_label, category.label as category_label, severity.label as severity_label " ;
2020-04-16 00:42:57 +02:00
$sql .= " FROM " . MAIN_DB_PREFIX . " ticket as t " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " c_ticket_type as type ON type.code=t.type_code " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " c_ticket_category as category ON category.code=t.category_code " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " c_ticket_severity as severity ON severity.code=t.severity_code " ;
if ( $id ) {
2021-03-30 19:12:07 +02:00
$sql .= " WHERE t.rowid = " . (( int ) $id );
2020-04-16 00:42:57 +02:00
} else {
$sql .= " WHERE t.entity IN ( " . getEntity ( $this -> element , 1 ) . " ) " ;
2020-09-07 10:18:17 +02:00
if ( ! empty ( $ref )) {
2020-04-16 00:42:57 +02:00
$sql .= " AND t.ref = ' " . $this -> db -> escape ( $ref ) . " ' " ;
2020-08-23 18:04:52 +02:00
} elseif ( $track_id ) {
$sql .= " AND t.track_id = ' " . $this -> db -> escape ( $track_id ) . " ' " ;
} else {
$sql .= " AND t.email_msgid = ' " . $this -> db -> escape ( $email_msgid ) . " ' " ;
2020-04-16 00:42:57 +02:00
}
}
2021-08-27 22:42:04 +02:00
dol_syslog ( get_class ( $this ) . " ::fetch " , LOG_DEBUG );
2020-04-16 00:42:57 +02:00
$resql = $this -> db -> query ( $sql );
if ( $resql ) {
2021-02-26 13:27:00 +01:00
if ( $this -> db -> num_rows ( $resql )) {
2020-04-16 00:42:57 +02:00
$obj = $this -> db -> fetch_object ( $resql );
$this -> id = $obj -> rowid ;
2021-10-22 15:12:56 +02:00
$this -> entity = $obj -> entity ;
2020-04-16 00:42:57 +02:00
$this -> ref = $obj -> ref ;
$this -> track_id = $obj -> track_id ;
$this -> fk_soc = $obj -> fk_soc ;
$this -> socid = $obj -> fk_soc ; // for fetch_thirdparty() method
$this -> fk_project = $obj -> fk_project ;
2023-08-04 14:50:31 +02:00
$this -> fk_contract = $obj -> fk_contract ;
2020-04-16 00:42:57 +02:00
$this -> origin_email = $obj -> origin_email ;
2024-02-08 13:58:40 +01:00
$this -> origin_replyto = $obj -> origin_replyto ;
2024-03-18 15:11:50 +01:00
$this -> origin_references = $obj -> origin_references ;
2020-04-16 00:42:57 +02:00
$this -> fk_user_create = $obj -> fk_user_create ;
$this -> fk_user_assign = $obj -> fk_user_assign ;
2020-08-21 01:11:22 +02:00
$this -> email_msgid = $obj -> email_msgid ;
2022-08-02 20:37:42 +02:00
$this -> email_date = $this -> db -> jdate ( $obj -> email_date );
2020-04-16 00:42:57 +02:00
$this -> subject = $obj -> subject ;
$this -> message = $obj -> message ;
2024-02-07 19:36:23 +01:00
$this -> model_pdf = $obj -> model_pdf ;
$this -> extraparams = ! empty ( $obj -> extraparams ) ? ( array ) json_decode ( $obj -> extraparams , true ) : array ();
2023-03-17 21:09:43 +01:00
$this -> ip = $obj -> ip ;
2020-06-26 19:35:09 +02:00
$this -> status = $obj -> status ;
2020-09-07 10:18:17 +02:00
$this -> fk_statut = $this -> status ; // For backward compatibility
2020-06-26 19:35:09 +02:00
2020-04-16 00:42:57 +02:00
$this -> resolution = $obj -> resolution ;
$this -> progress = $obj -> progress ;
$this -> timing = $obj -> timing ;
$this -> type_code = $obj -> type_code ;
2023-12-27 12:12:20 +01:00
$label_type = ( $langs -> trans ( " TicketTypeShort " . $obj -> type_code ) != " TicketTypeShort " . $obj -> type_code ? $langs -> trans ( " TicketTypeShort " . $obj -> type_code ) : ( $obj -> type_label != '-' ? $obj -> type_label : '' ));
2020-04-16 00:42:57 +02:00
$this -> type_label = $label_type ;
$this -> category_code = $obj -> category_code ;
2023-12-27 12:12:20 +01:00
$label_category = ( $langs -> trans ( " TicketCategoryShort " . $obj -> category_code ) != " TicketCategoryShort " . $obj -> category_code ? $langs -> trans ( " TicketCategoryShort " . $obj -> category_code ) : ( $obj -> category_label != '-' ? $obj -> category_label : '' ));
2020-04-16 00:42:57 +02:00
$this -> category_label = $label_category ;
$this -> severity_code = $obj -> severity_code ;
2023-12-27 12:12:20 +01:00
$label_severity = ( $langs -> trans ( " TicketSeverityShort " . $obj -> severity_code ) != " TicketSeverityShort " . $obj -> severity_code ? $langs -> trans ( " TicketSeverityShort " . $obj -> severity_code ) : ( $obj -> severity_label != '-' ? $obj -> severity_label : '' ));
2020-04-16 00:42:57 +02:00
$this -> severity_label = $label_severity ;
$this -> datec = $this -> db -> jdate ( $obj -> datec );
$this -> date_creation = $this -> db -> jdate ( $obj -> datec );
$this -> date_read = $this -> db -> jdate ( $obj -> date_read );
$this -> date_validation = $this -> db -> jdate ( $obj -> date_read );
2022-02-04 16:14:41 +01:00
$this -> date_last_msg_sent = $this -> db -> jdate ( $obj -> date_last_msg_sent );
2020-04-16 00:42:57 +02:00
$this -> date_close = $this -> db -> jdate ( $obj -> date_close );
$this -> tms = $this -> db -> jdate ( $obj -> tms );
$this -> date_modification = $this -> db -> jdate ( $obj -> tms );
$this -> fetch_optionals ();
$this -> db -> free ( $resql );
return 1 ;
2020-05-21 15:05:19 +02:00
} else {
2020-04-16 00:42:57 +02:00
return 0 ;
}
} else {
$this -> error = " Error " . $this -> db -> lasterror ();
dol_syslog ( get_class ( $this ) . " ::fetch " . $this -> error , LOG_ERR );
return - 1 ;
}
}
/**
* Load all objects in memory from database
*
2024-08-31 19:43:58 +02:00
* @ param User $user User for action
* @ param string $sortorder Sort order
* @ param string $sortfield Sort field
* @ param int $limit Limit
* @ param int $offset Offset page
* @ param int $arch Archive or not ( not used )
* @ param string | array < string , int > $filter Filter for query
* @ return int Return integer < 0 if KO , > 0 if OK
2024-03-11 11:23:34 +01:00
*/
public function fetchAll ( $user , $sortorder = 'ASC' , $sortfield = 't.datec' , $limit = 0 , $offset = 0 , $arch = 0 , $filter = '' )
2020-04-16 00:42:57 +02:00
{
2023-08-11 11:42:49 +02:00
global $langs , $extrafields ;
2020-04-16 00:42:57 +02:00
// fetch optionals attributes and labels
$extrafields -> fetch_name_optionals_label ( $this -> table_element );
$sql = " SELECT " ;
$sql .= " t.rowid, " ;
$sql .= " t.ref, " ;
$sql .= " t.track_id, " ;
$sql .= " t.fk_soc, " ;
$sql .= " t.fk_project, " ;
2023-08-04 14:50:31 +02:00
$sql .= " t.fk_contract, " ;
2020-04-16 00:42:57 +02:00
$sql .= " t.origin_email, " ;
2024-02-08 13:58:40 +01:00
$sql .= " t.origin_replyto, " ;
2024-03-18 15:11:50 +01:00
$sql .= " t.origin_references, " ;
2020-04-16 00:42:57 +02:00
$sql .= " t.fk_user_create, uc.lastname as user_create_lastname, uc.firstname as user_create_firstname, " ;
$sql .= " t.fk_user_assign, ua.lastname as user_assign_lastname, ua.firstname as user_assign_firstname, " ;
$sql .= " t.subject, " ;
$sql .= " t.message, " ;
2023-08-11 11:42:49 +02:00
$sql .= " t.fk_statut as status, " ;
2020-04-16 00:42:57 +02:00
$sql .= " t.resolution, " ;
$sql .= " t.progress, " ;
$sql .= " t.timing, " ;
$sql .= " t.type_code, " ;
$sql .= " t.category_code, " ;
$sql .= " t.severity_code, " ;
$sql .= " t.datec, " ;
$sql .= " t.date_read, " ;
2022-02-04 16:14:41 +01:00
$sql .= " t.date_last_msg_sent, " ;
2020-04-16 00:42:57 +02:00
$sql .= " t.date_close, " ;
2024-01-09 13:08:22 +01:00
$sql .= " t.tms, " ;
$sql .= " type.label as type_label, category.label as category_label, severity.label as severity_label " ;
2020-04-16 00:42:57 +02:00
// Add fields for extrafields
2024-03-11 12:55:55 +01:00
if ( $extrafields -> attributes [ $this -> table_element ][ 'count' ] > 0 ) {
2023-08-04 14:50:31 +02:00
foreach ( $extrafields -> attributes [ $this -> table_element ][ 'label' ] as $key => $val ) {
$sql .= ( $extrafields -> attributes [ $this -> table_element ][ 'type' ][ $key ] != 'separate' ? " ,ef. " . $key . " as options_ " . $key : '' );
}
2020-04-16 00:42:57 +02:00
}
$sql .= " FROM " . MAIN_DB_PREFIX . " ticket as t " ;
2024-01-09 13:08:22 +01:00
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " c_ticket_type as type ON type.code = t.type_code " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " c_ticket_category as category ON category.code = t.category_code " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " c_ticket_severity as severity ON severity.code = t.severity_code " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " societe as s ON s.rowid = t.fk_soc " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " user as uc ON uc.rowid = t.fk_user_create " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " user as ua ON ua.rowid = t.fk_user_assign " ;
2024-03-11 12:55:55 +01:00
if ( $extrafields -> attributes [ $this -> table_element ][ 'count' ] > 0 ) {
2023-08-04 14:50:31 +02:00
if ( is_array ( $extrafields -> attributes [ $this -> table_element ][ 'label' ]) && count ( $extrafields -> attributes [ $this -> table_element ][ 'label' ])) {
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " ticket_extrafields as ef on (t.rowid = ef.fk_object) " ;
}
2020-04-16 00:42:57 +02:00
}
$sql .= " WHERE t.entity IN ( " . getEntity ( 'ticket' ) . " ) " ;
// Manage filter
2024-03-11 11:23:34 +01:00
if ( is_array ( $filter )) {
2020-04-16 00:42:57 +02:00
foreach ( $filter as $key => $value ) {
if ( strpos ( $key , 'date' )) { // To allow $filter['YEAR(s.dated)']=>$year
2024-03-05 03:51:36 +01:00
$sql .= " AND " . $this -> db -> sanitize ( $key ) . " = ' " . $this -> db -> escape ( $value ) . " ' " ;
2020-04-16 00:42:57 +02:00
} elseif (( $key == 't.fk_user_assign' ) || ( $key == 't.type_code' ) || ( $key == 't.category_code' ) || ( $key == 't.severity_code' ) || ( $key == 't.fk_soc' )) {
2024-03-05 03:51:36 +01:00
$sql .= " AND " . $this -> db -> sanitize ( $key ) . " = ' " . $this -> db -> escape ( $value ) . " ' " ;
2020-04-16 00:42:57 +02:00
} elseif ( $key == 't.fk_statut' ) {
if ( is_array ( $value ) && count ( $value ) > 0 ) {
2024-03-05 03:51:36 +01:00
$sql .= " AND " . $this -> db -> sanitize ( $key ) . " IN ( " . $this -> db -> sanitize ( implode ( ',' , $value )) . " ) " ;
2020-04-16 00:42:57 +02:00
} else {
2024-03-05 03:51:36 +01:00
$sql .= " AND " . $this -> db -> sanitize ( $key ) . ' = ' . (( int ) $value );
2020-04-16 00:42:57 +02:00
}
2023-08-04 14:50:31 +02:00
} elseif ( $key == 't.fk_contract' ) {
2024-03-05 03:51:36 +01:00
$sql .= " AND " . $this -> db -> sanitize ( $key ) . ' = ' . (( int ) $value );
2020-04-16 00:42:57 +02:00
} else {
2024-03-05 03:51:36 +01:00
$sql .= " AND " . $this -> db -> sanitize ( $key ) . " LIKE '% " . $this -> db -> escape ( $this -> db -> escapeforlike ( $value )) . " %' " ;
2020-04-16 00:42:57 +02:00
}
}
2024-03-11 11:23:34 +01:00
$filter = '' ;
}
// Manage filter
$errormessage = '' ;
$sql .= forgeSQLFromUniversalSearchCriteria ( $filter , $errormessage );
if ( $errormessage ) {
$this -> errors [] = $errormessage ;
2024-03-11 12:38:21 +01:00
dol_syslog ( __METHOD__ . ' ' . implode ( ',' , $this -> errors ), LOG_ERR );
2024-03-11 11:23:34 +01:00
return - 1 ;
2020-04-16 00:42:57 +02:00
}
2024-01-09 13:08:22 +01:00
// Case of external user
2024-08-31 19:43:58 +02:00
$socid = $user -> socid ? : 0 ;
2024-01-09 13:08:22 +01:00
// If the internal user must only see his customers, force searching by him
$search_sale = 0 ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2024-01-09 13:08:22 +01:00
$search_sale = $user -> id ;
}
// Search on sale representative
if ( $search_sale && $search_sale != '-1' ) {
if ( $search_sale == - 2 ) {
$sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . " societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc) " ;
} elseif ( $search_sale > 0 ) {
$sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . " societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc AND sc.fk_user = " . (( int ) $search_sale ) . " ) " ;
}
}
// Search on socid
if ( $socid ) {
$sql .= " AND t.fk_soc = " . (( int ) $socid );
2020-04-16 00:42:57 +02:00
}
2021-08-28 03:09:18 +02:00
$sql .= $this -> db -> order ( $sortfield , $sortorder );
2020-04-16 00:42:57 +02:00
if ( ! empty ( $limit )) {
2021-08-27 22:42:04 +02:00
$sql .= $this -> db -> plimit ( $limit + 1 , $offset );
2020-04-16 00:42:57 +02:00
}
2022-04-30 19:50:20 +02:00
dol_syslog ( get_class ( $this ) . " ::fetchAll " , LOG_DEBUG );
2020-04-16 00:42:57 +02:00
$resql = $this -> db -> query ( $sql );
if ( $resql ) {
$this -> lines = array ();
$num = $this -> db -> num_rows ( $resql );
$i = 0 ;
if ( $num ) {
while ( $i < $num ) {
$obj = $this -> db -> fetch_object ( $resql );
2023-08-11 11:42:49 +02:00
$line = new self ( $this -> db );
2020-04-16 00:42:57 +02:00
$line -> id = $obj -> rowid ;
2023-08-11 11:42:49 +02:00
//$line->rowid = $obj->rowid;
2020-04-16 00:42:57 +02:00
$line -> ref = $obj -> ref ;
$line -> track_id = $obj -> track_id ;
$line -> fk_soc = $obj -> fk_soc ;
$line -> fk_project = $obj -> fk_project ;
2023-08-04 14:50:31 +02:00
$line -> fk_contract = $obj -> fk_contract ;
2020-04-16 00:42:57 +02:00
$line -> origin_email = $obj -> origin_email ;
2024-02-08 13:58:40 +01:00
$line -> origin_replyto = $obj -> origin_replyto ;
2024-03-18 15:11:50 +01:00
$line -> origin_references = $obj -> origin_references ;
2020-04-16 00:42:57 +02:00
$line -> fk_user_create = $obj -> fk_user_create ;
$line -> fk_user_assign = $obj -> fk_user_assign ;
$line -> subject = $obj -> subject ;
$line -> message = $obj -> message ;
2023-08-11 11:42:49 +02:00
$line -> fk_statut = $obj -> status ;
$line -> status = $obj -> status ;
2020-04-16 00:42:57 +02:00
$line -> resolution = $obj -> resolution ;
$line -> progress = $obj -> progress ;
$line -> timing = $obj -> timing ;
2023-12-27 12:12:20 +01:00
$label_type = ( $langs -> trans ( " TicketTypeShort " . $obj -> type_code ) != " TicketTypeShort " . $obj -> type_code ? $langs -> trans ( " TicketTypeShort " . $obj -> type_code ) : ( $obj -> type_label != '-' ? $obj -> type_label : '' ));
2020-04-16 00:42:57 +02:00
$line -> type_label = $label_type ;
$this -> category_code = $obj -> category_code ;
2023-12-27 12:12:20 +01:00
$label_category = ( $langs -> trans ( " TicketCategoryShort " . $obj -> category_code ) != " TicketCategoryShort " . $obj -> category_code ? $langs -> trans ( " TicketCategoryShort " . $obj -> category_code ) : ( $obj -> category_label != '-' ? $obj -> category_label : '' ));
2020-04-16 00:42:57 +02:00
$line -> category_label = $label_category ;
$this -> severity_code = $obj -> severity_code ;
2023-12-27 12:12:20 +01:00
$label_severity = ( $langs -> trans ( " TicketSeverityShort " . $obj -> severity_code ) != " TicketSeverityShort " . $obj -> severity_code ? $langs -> trans ( " TicketSeverityShort " . $obj -> severity_code ) : ( $obj -> severity_label != '-' ? $obj -> severity_label : '' ));
2020-04-16 00:42:57 +02:00
$line -> severity_label = $label_severity ;
$line -> datec = $this -> db -> jdate ( $obj -> datec );
$line -> date_read = $this -> db -> jdate ( $obj -> date_read );
2022-02-04 16:14:41 +01:00
$line -> date_last_msg_sent = $this -> db -> jdate ( $obj -> date_last_msg_sent );
2020-04-16 00:42:57 +02:00
$line -> date_close = $this -> db -> jdate ( $obj -> date_close );
// Extra fields
2024-03-11 12:55:55 +01:00
if ( $extrafields -> attributes [ $this -> table_element ][ 'count' ] > 0 ) {
2023-08-04 14:50:31 +02:00
if ( is_array ( $extrafields -> attributes [ $this -> table_element ][ 'label' ]) && count ( $extrafields -> attributes [ $this -> table_element ][ 'label' ])) {
foreach ( $extrafields -> attributes [ $this -> table_element ][ 'label' ] as $key => $val ) {
$tmpkey = 'options_' . $key ;
$line -> { $tmpkey } = $obj -> $tmpkey ;
}
2020-04-16 00:42:57 +02:00
}
}
$this -> lines [ $i ] = $line ;
$i ++ ;
}
}
$this -> db -> free ( $resql );
return $num ;
} else {
$this -> error = " Error " . $this -> db -> lasterror ();
2022-04-30 19:50:20 +02:00
dol_syslog ( get_class ( $this ) . " ::fetchAll " . $this -> error , LOG_ERR );
2020-04-16 00:42:57 +02:00
return - 1 ;
}
}
/**
* Update object into database
*
* @ param User $user User that modifies
* @ param int $notrigger 0 = launch triggers after , 1 = disable triggers
2023-12-01 19:51:32 +01:00
* @ return int Return integer < 0 if KO , > 0 if OK
2020-04-16 00:42:57 +02:00
*/
2024-01-02 15:14:25 +01:00
public function update ( $user , $notrigger = 0 )
2020-04-16 00:42:57 +02:00
{
$error = 0 ;
2024-04-22 18:57:21 +02:00
// $this->oldcopy should have been set by the caller of update
2022-08-22 15:06:09 +02:00
//if (empty($this->oldcopy)) {
2024-04-22 18:57:21 +02:00
// dol_syslog("this->oldcopy should have been set by the caller of update (here properties were already modified)", LOG_WARNING);
// $this->oldcopy = dol_clone($this, 2);
2022-08-22 15:06:09 +02:00
//}
2022-08-11 15:23:53 +02:00
2020-04-16 00:42:57 +02:00
// Clean parameters
if ( isset ( $this -> ref )) {
$this -> ref = trim ( $this -> ref );
}
if ( isset ( $this -> track_id )) {
$this -> track_id = trim ( $this -> track_id );
}
if ( isset ( $this -> fk_soc )) {
$this -> fk_soc = ( int ) $this -> fk_soc ;
}
if ( isset ( $this -> fk_project )) {
$this -> fk_project = ( int ) $this -> fk_project ;
}
2023-08-04 10:40:02 +02:00
if ( isset ( $this -> fk_contract )) {
$this -> fk_contract = ( int ) $this -> fk_contract ;
}
2023-08-11 12:34:27 +02:00
2020-04-16 00:42:57 +02:00
if ( isset ( $this -> origin_email )) {
$this -> origin_email = trim ( $this -> origin_email );
}
if ( isset ( $this -> fk_user_create )) {
$this -> fk_user_create = ( int ) $this -> fk_user_create ;
}
if ( isset ( $this -> fk_user_assign )) {
$this -> fk_user_assign = ( int ) $this -> fk_user_assign ;
}
if ( isset ( $this -> subject )) {
$this -> subject = trim ( $this -> subject );
}
if ( isset ( $this -> message )) {
$this -> message = trim ( $this -> message );
2022-12-15 15:08:14 +01:00
if ( dol_strlen ( $this -> message ) > 65000 ) {
$this -> errors [] = 'ErrorFieldTooLong' ;
dol_syslog ( get_class ( $this ) . '::update error -1 message too long' , LOG_ERR );
return - 1 ;
}
2020-04-16 00:42:57 +02:00
}
2024-06-29 18:57:43 +02:00
if ( isset ( $this -> status )) {
$this -> status = ( int ) $this -> status ;
2020-04-16 00:42:57 +02:00
}
if ( isset ( $this -> resolution )) {
2024-06-29 18:57:43 +02:00
$this -> resolution = ( int ) $this -> resolution ;
2020-04-16 00:42:57 +02:00
}
if ( isset ( $this -> progress )) {
2024-01-31 22:37:40 +01:00
$this -> progress = ( int ) $this -> progress ;
2020-04-16 00:42:57 +02:00
}
if ( isset ( $this -> timing )) {
$this -> timing = trim ( $this -> timing );
}
if ( isset ( $this -> type_code )) {
$this -> timing = trim ( $this -> type_code );
}
if ( isset ( $this -> category_code )) {
$this -> timing = trim ( $this -> category_code );
}
if ( isset ( $this -> severity_code )) {
$this -> timing = trim ( $this -> severity_code );
}
2024-02-07 19:36:23 +01:00
if ( isset ( $this -> model_pdf )) {
$this -> model_pdf = trim ( $this -> model_pdf );
}
2020-04-16 00:42:57 +02:00
// Check parameters
// Put here code to add a control on parameters values
// Update request
$sql = " UPDATE " . MAIN_DB_PREFIX . " ticket SET " ;
$sql .= " ref= " . ( isset ( $this -> ref ) ? " ' " . $this -> db -> escape ( $this -> ref ) . " ' " : " " ) . " , " ;
$sql .= " track_id= " . ( isset ( $this -> track_id ) ? " ' " . $this -> db -> escape ( $this -> track_id ) . " ' " : " null " ) . " , " ;
2024-03-10 01:59:42 +01:00
$sql .= " fk_soc= " . ( isset ( $this -> fk_soc ) ? ( int ) $this -> fk_soc : " null " ) . " , " ;
$sql .= " fk_project= " . ( isset ( $this -> fk_project ) ? ( int ) $this -> fk_project : " null " ) . " , " ;
$sql .= " fk_contract= " . ( isset ( $this -> fk_contract ) ? ( int ) $this -> fk_contract : " null " ) . " , " ;
2020-04-16 00:42:57 +02:00
$sql .= " origin_email= " . ( isset ( $this -> origin_email ) ? " ' " . $this -> db -> escape ( $this -> origin_email ) . " ' " : " null " ) . " , " ;
2024-03-10 01:59:42 +01:00
$sql .= " origin_replyto= " . ( isset ( $this -> origin_replyto ) ? " ' " . $this -> db -> escape ( $this -> origin_replyto ) . " ' " : " null " ) . " , " ;
2024-03-18 15:11:50 +01:00
$sql .= " origin_references= " . ( isset ( $this -> origin_references ) ? " ' " . $this -> db -> escape ( $this -> origin_references ) . " ' " : " null " ) . " , " ;
2024-03-10 01:59:42 +01:00
$sql .= " fk_user_create= " . ( isset ( $this -> fk_user_create ) ? ( int ) $this -> fk_user_create : " null " ) . " , " ;
$sql .= " fk_user_assign= " . ( isset ( $this -> fk_user_assign ) ? ( int ) $this -> fk_user_assign : " null " ) . " , " ;
2020-04-16 00:42:57 +02:00
$sql .= " subject= " . ( isset ( $this -> subject ) ? " ' " . $this -> db -> escape ( $this -> subject ) . " ' " : " null " ) . " , " ;
$sql .= " message= " . ( isset ( $this -> message ) ? " ' " . $this -> db -> escape ( $this -> message ) . " ' " : " null " ) . " , " ;
2024-06-29 18:57:43 +02:00
$sql .= " fk_statut= " . ( isset ( $this -> status ) ? ( int ) $this -> status : " 0 " ) . " , " ;
2024-03-10 01:59:42 +01:00
$sql .= " resolution= " . ( isset ( $this -> resolution ) ? ( int ) $this -> resolution : " null " ) . " , " ;
2020-04-16 00:42:57 +02:00
$sql .= " progress= " . ( isset ( $this -> progress ) ? " ' " . $this -> db -> escape ( $this -> progress ) . " ' " : " null " ) . " , " ;
$sql .= " timing= " . ( isset ( $this -> timing ) ? " ' " . $this -> db -> escape ( $this -> timing ) . " ' " : " null " ) . " , " ;
$sql .= " type_code= " . ( isset ( $this -> type_code ) ? " ' " . $this -> db -> escape ( $this -> type_code ) . " ' " : " null " ) . " , " ;
$sql .= " category_code= " . ( isset ( $this -> category_code ) ? " ' " . $this -> db -> escape ( $this -> category_code ) . " ' " : " null " ) . " , " ;
$sql .= " severity_code= " . ( isset ( $this -> severity_code ) ? " ' " . $this -> db -> escape ( $this -> severity_code ) . " ' " : " null " ) . " , " ;
2024-06-29 18:57:43 +02:00
$sql .= " datec= " . ( isDolTms ( $this -> datec ) ? " ' " . $this -> db -> idate ( $this -> datec ) . " ' " : 'null' ) . " , " ;
2024-09-13 17:40:03 +02:00
$sql .= " date_read= " . ( dol_strlen (( string ) $this -> date_read ) != 0 ? " ' " . $this -> db -> idate ( $this -> date_read ) . " ' " : 'null' ) . " , " ;
$sql .= " date_last_msg_sent= " . ( dol_strlen (( string ) $this -> date_last_msg_sent ) != 0 ? " ' " . $this -> db -> idate ( $this -> date_last_msg_sent ) . " ' " : 'null' ) . " , " ;
2024-02-07 19:36:23 +01:00
$sql .= " model_pdf= " . ( isset ( $this -> model_pdf ) ? " ' " . $this -> db -> escape ( $this -> model_pdf ) . " ' " : " null " ) . " , " ;
2024-09-13 17:40:03 +02:00
$sql .= " date_close= " . ( dol_strlen (( string ) $this -> date_close ) != 0 ? " ' " . $this -> db -> idate ( $this -> date_close ) . " ' " : 'null' );
2021-03-14 12:20:23 +01:00
$sql .= " WHERE rowid= " . (( int ) $this -> id );
2020-04-16 00:42:57 +02:00
$this -> db -> begin ();
$resql = $this -> db -> query ( $sql );
if ( ! $resql ) {
$error ++ ;
$this -> errors [] = " Error " . $this -> db -> lasterror ();
}
if ( ! $error ) {
// Update extrafields
2020-04-23 13:21:39 +02:00
$result = $this -> insertExtraFields ();
if ( $result < 0 ) {
$error ++ ;
2020-04-16 00:42:57 +02:00
}
}
if ( ! $error && ! $notrigger ) {
// Call trigger
$result = $this -> call_trigger ( 'TICKET_MODIFY' , $user );
if ( $result < 0 ) {
$error ++ ;
}
2023-12-04 13:53:48 +01:00
// End call triggers
2020-04-16 00:42:57 +02:00
}
// Commit or rollback
if ( $error ) {
foreach ( $this -> errors as $errmsg ) {
dol_syslog ( get_class ( $this ) . " ::update " . $errmsg , LOG_ERR );
$this -> error .= ( $this -> error ? ', ' . $errmsg : $errmsg );
}
$this -> db -> rollback ();
return - 1 * $error ;
} else {
$this -> db -> commit ();
return 1 ;
}
}
/**
* Delete object in database
*
* @ param User $user User that deletes
* @ param int $notrigger 0 = launch triggers after , 1 = disable triggers
2023-12-01 19:51:32 +01:00
* @ return int Return integer < 0 if KO , > 0 if OK
2020-04-16 00:42:57 +02:00
*/
public function delete ( $user , $notrigger = 0 )
{
$error = 0 ;
$this -> db -> begin ();
2024-08-31 19:43:58 +02:00
if ( ! $notrigger ) {
// Call trigger
$result = $this -> call_trigger ( 'TICKET_DELETE' , $user );
if ( $result < 0 ) {
$error ++ ;
2020-04-16 00:42:57 +02:00
}
2024-08-31 19:43:58 +02:00
// End call triggers
2020-04-16 00:42:57 +02:00
}
if ( ! $error ) {
// Delete linked contacts
$res = $this -> delete_linked_contact ();
if ( $res < 0 ) {
dol_syslog ( get_class ( $this ) . " ::delete error " , LOG_ERR );
$error ++ ;
}
}
if ( ! $error ) {
// Delete linked object
$res = $this -> deleteObjectLinked ();
2021-02-26 13:27:00 +01:00
if ( $res < 0 ) {
$error ++ ;
}
2020-04-16 00:42:57 +02:00
}
// Removed extrafields
if ( ! $error ) {
$result = $this -> deleteExtraFields ();
if ( $result < 0 ) {
$error ++ ;
dol_syslog ( get_class ( $this ) . " ::delete error -3 " . $this -> error , LOG_ERR );
}
}
2022-09-08 11:52:10 +02:00
// Delete all child tables
if ( ! $error ) {
$sql = " DELETE FROM " . MAIN_DB_PREFIX . " categorie_ticket " ;
$sql .= " WHERE fk_ticket = " . ( int ) $this -> id ;
$result = $this -> db -> query ( $sql );
if ( ! $result ) {
$error ++ ;
$this -> errors [] = $this -> db -> lasterror ();
}
}
2020-04-16 00:42:57 +02:00
if ( ! $error ) {
$sql = " DELETE FROM " . MAIN_DB_PREFIX . " ticket " ;
2021-03-14 12:20:23 +01:00
$sql .= " WHERE rowid= " . (( int ) $this -> id );
2020-04-16 00:42:57 +02:00
dol_syslog ( get_class ( $this ) . " ::delete sql= " . $sql );
$resql = $this -> db -> query ( $sql );
if ( ! $resql ) {
$error ++ ;
$this -> errors [] = " Error " . $this -> db -> lasterror ();
2024-06-08 15:04:18 +02:00
} else {
// we delete file with dol_delete_dir_recursive
$this -> deleteEcmFiles ( 1 );
$dir = DOL_DATA_ROOT . '/' . $this -> element . '/' . $this -> ref ;
// For remove dir
if ( dol_is_dir ( $dir )) {
if ( ! dol_delete_dir_recursive ( $dir )) {
$this -> errors [] = $this -> error ;
}
}
2020-04-16 00:42:57 +02:00
}
}
// Commit or rollback
if ( $error ) {
foreach ( $this -> errors as $errmsg ) {
dol_syslog ( get_class ( $this ) . " ::delete " . $errmsg , LOG_ERR );
$this -> error .= ( $this -> error ? ', ' . $errmsg : $errmsg );
}
$this -> db -> rollback ();
return - 1 * $error ;
} else {
$this -> db -> commit ();
return 1 ;
}
}
/**
* Load an object from its id and create a new one in database
*
* @ param User $user User that clone
* @ param int $fromid Id of object to clone
* @ return int New id of clone
*/
public function createFromClone ( User $user , $fromid )
{
$error = 0 ;
$object = new Ticket ( $this -> db );
$this -> db -> begin ();
// Load source object
$object -> fetch ( $fromid );
2024-04-22 18:57:21 +02:00
// Clear fields
2020-04-16 00:42:57 +02:00
$object -> id = 0 ;
$object -> statut = 0 ;
2024-04-22 18:57:21 +02:00
$object -> status = 0 ;
2020-04-16 00:42:57 +02:00
// Create clone
$object -> context [ 'createfromclone' ] = 'createfromclone' ;
$result = $object -> create ( $user );
// Other options
if ( $result < 0 ) {
$this -> error = $object -> error ;
$error ++ ;
}
unset ( $object -> context [ 'createfromclone' ]);
// End
if ( ! $error ) {
$this -> db -> commit ();
return $object -> id ;
} else {
$this -> db -> rollback ();
return - 1 ;
}
}
/**
* Initialise object with example values
* Id must be 0 if object instance is a specimen
*
2020-10-30 20:37:23 +01:00
* @ return int
2020-04-16 00:42:57 +02:00
*/
public function initAsSpecimen ()
{
$this -> id = 0 ;
2020-10-30 20:37:23 +01:00
$this -> entity = 1 ;
2020-04-16 00:42:57 +02:00
$this -> ref = 'TI0501-001' ;
$this -> track_id = 'XXXXaaaa' ;
$this -> origin_email = 'email@email.com' ;
$this -> fk_project = 1 ;
$this -> fk_user_create = 1 ;
$this -> fk_user_assign = 1 ;
$this -> subject = 'Subject of ticket' ;
$this -> message = 'Message of ticket' ;
2020-10-30 20:37:23 +01:00
$this -> status = 0 ;
2024-06-29 18:57:43 +02:00
$this -> resolution = 1 ;
2024-01-31 22:37:40 +01:00
$this -> progress = 10 ;
2024-06-29 18:57:43 +02:00
// $this->timing = '30';
2020-04-16 00:42:57 +02:00
$this -> type_code = 'TYPECODE' ;
$this -> category_code = 'CATEGORYCODE' ;
$this -> severity_code = 'SEVERITYCODE' ;
2024-01-31 22:37:40 +01:00
$this -> datec = dol_now ();
$this -> date_read = dol_now ();
$this -> date_last_msg_sent = dol_now ();
$this -> date_close = dol_now ();
$this -> tms = dol_now ();
2024-03-02 16:38:35 +01:00
2020-10-30 20:37:23 +01:00
return 1 ;
2020-04-16 00:42:57 +02:00
}
/**
2021-05-28 14:12:22 +02:00
* Print selected status
2020-04-16 00:42:57 +02:00
*
2021-05-28 14:12:22 +02:00
* @ param string $selected Selected status
* @ return void
2020-04-16 00:42:57 +02:00
*/
public function printSelectStatus ( $selected = " " )
{
2023-11-24 10:10:24 +01:00
print Form :: selectarray ( 'search_fk_statut' , $this -> labelStatusShort , $selected , $show_empty = 1 , $key_in_label = 0 , $value_as_key = 0 , $option = '' , $translate = 1 , $maxlen = 0 , $disabled = 0 , $sort = '' , $morecss = '' );
2020-04-16 00:42:57 +02:00
}
/**
2021-05-28 14:12:22 +02:00
* Load into a cache the types of tickets ( setup done into dictionaries )
2020-04-16 00:42:57 +02:00
*
2021-05-28 14:12:22 +02:00
* @ return int Number of lines loaded , 0 if already loaded , < 0 if KO
2020-04-16 00:42:57 +02:00
*/
public function loadCacheTypesTickets ()
{
global $langs ;
if ( ! empty ( $this -> cache_types_tickets ) && count ( $this -> cache_types_tickets )) {
return 0 ;
}
// Cache deja charge
$sql = " SELECT rowid, code, label, use_default, pos, description " ;
$sql .= " FROM " . MAIN_DB_PREFIX . " c_ticket_type " ;
2023-09-27 00:05:36 +02:00
$sql .= " WHERE entity IN ( " . getEntity ( 'c_ticket_type' ) . " ) " ;
2023-09-23 10:05:36 +02:00
$sql .= " AND active > 0 " ;
2020-04-16 00:42:57 +02:00
$sql .= " ORDER BY pos " ;
2021-08-27 22:42:04 +02:00
dol_syslog ( get_class ( $this ) . " ::load_cache_type_tickets " , LOG_DEBUG );
2020-04-16 00:42:57 +02:00
$resql = $this -> db -> query ( $sql );
if ( $resql ) {
$num = $this -> db -> num_rows ( $resql );
$i = 0 ;
while ( $i < $num ) {
$obj = $this -> db -> fetch_object ( $resql );
2023-12-27 12:12:20 +01:00
$label = ( $langs -> trans ( " TicketTypeShort " . $obj -> code ) != " TicketTypeShort " . $obj -> code ? $langs -> trans ( " TicketTypeShort " . $obj -> code ) : ( $obj -> label != '-' ? $obj -> label : '' ));
2020-04-16 00:42:57 +02:00
$this -> cache_types_tickets [ $obj -> rowid ][ 'code' ] = $obj -> code ;
$this -> cache_types_tickets [ $obj -> rowid ][ 'label' ] = $label ;
$this -> cache_types_tickets [ $obj -> rowid ][ 'use_default' ] = $obj -> use_default ;
$this -> cache_types_tickets [ $obj -> rowid ][ 'pos' ] = $obj -> pos ;
$i ++ ;
}
return $num ;
} else {
dol_print_error ( $this -> db );
return - 1 ;
}
}
/**
2021-09-16 14:31:20 +02:00
* Load into a cache array , the list of ticket categories ( setup done into dictionary )
2020-04-16 00:42:57 +02:00
*
2024-10-19 01:21:41 +02:00
* @ param int <- 1 , 1 > $publicgroup 0 = No public group , 1 = Public group only , - 1 = All
* @ return int Number of lines loaded , 0 if already loaded , < 0 if KO
2020-04-16 00:42:57 +02:00
*/
2023-05-13 15:17:17 +02:00
public function loadCacheCategoriesTickets ( $publicgroup = - 1 )
2020-04-16 00:42:57 +02:00
{
2025-02-05 13:35:43 +01:00
global $conf , $langs ;
2020-04-16 00:42:57 +02:00
2025-02-05 13:35:43 +01:00
if ( $publicgroup == - 1 && ! empty ( $conf -> cache [ 'category_tickets' ]) && count ( $conf -> cache [ 'category_tickets' ])) {
2021-09-16 14:31:20 +02:00
// Cache already loaded
2020-04-16 00:42:57 +02:00
return 0 ;
}
2021-07-10 20:09:51 +02:00
$sql = " SELECT rowid, code, label, use_default, pos, description, public, active, force_severity, fk_parent " ;
2020-04-16 00:42:57 +02:00
$sql .= " FROM " . MAIN_DB_PREFIX . " c_ticket_category " ;
2023-09-27 00:05:36 +02:00
$sql .= " WHERE entity IN ( " . getEntity ( 'c_ticket_category' ) . " ) " ;
2023-09-27 21:14:03 +02:00
$sql .= " AND active > 0 " ;
2023-05-13 15:17:17 +02:00
if ( $publicgroup > - 1 ) {
$sql .= " AND public = " . (( int ) $publicgroup );
}
2020-04-16 00:42:57 +02:00
$sql .= " ORDER BY pos " ;
2023-05-13 15:17:17 +02:00
2021-08-27 22:42:04 +02:00
dol_syslog ( get_class ( $this ) . " ::load_cache_categories_tickets " , LOG_DEBUG );
2023-05-13 15:17:17 +02:00
2020-04-16 00:42:57 +02:00
$resql = $this -> db -> query ( $sql );
if ( $resql ) {
$num = $this -> db -> num_rows ( $resql );
$i = 0 ;
while ( $i < $num ) {
$obj = $this -> db -> fetch_object ( $resql );
2025-02-05 13:35:43 +01:00
$conf -> cache [ 'category_tickets' ][ $obj -> rowid ][ 'code' ] = $obj -> code ;
$conf -> cache [ 'category_tickets' ][ $obj -> rowid ][ 'use_default' ] = $obj -> use_default ;
$conf -> cache [ 'category_tickets' ][ $obj -> rowid ][ 'pos' ] = $obj -> pos ;
$conf -> cache [ 'category_tickets' ][ $obj -> rowid ][ 'public' ] = $obj -> public ;
$conf -> cache [ 'category_tickets' ][ $obj -> rowid ][ 'active' ] = $obj -> active ;
$conf -> cache [ 'category_tickets' ][ $obj -> rowid ][ 'force_severity' ] = $obj -> force_severity ;
$conf -> cache [ 'category_tickets' ][ $obj -> rowid ][ 'fk_parent' ] = $obj -> fk_parent ;
2021-09-16 14:31:20 +02:00
// If translation exists, we use it to store already translated string.
// Warning: You should not use this and recompute the translated string into caller code to get the value into expected language
2023-12-27 12:12:20 +01:00
$label = ( $langs -> trans ( " TicketCategoryShort " . $obj -> code ) != " TicketCategoryShort " . $obj -> code ? $langs -> trans ( " TicketCategoryShort " . $obj -> code ) : ( $obj -> label != '-' ? $obj -> label : '' ));
2025-02-05 13:35:43 +01:00
$conf -> cache [ 'category_tickets' ][ $obj -> rowid ][ 'label' ] = $label ;
2021-09-16 14:31:20 +02:00
2020-04-16 00:42:57 +02:00
$i ++ ;
}
return $num ;
} else {
dol_print_error ( $this -> db );
return - 1 ;
}
}
/**
* Charge dans cache la liste des sévérité de tickets ( paramétrable dans dictionnaire )
*
* @ return int Number of lines loaded , 0 if already loaded , < 0 if KO
*/
public function loadCacheSeveritiesTickets ()
{
2024-04-02 13:18:38 +02:00
global $conf , $langs ;
2020-04-16 00:42:57 +02:00
2024-04-02 13:18:38 +02:00
if ( ! empty ( $conf -> cache [ 'severity_tickets' ]) && count ( $conf -> cache [ 'severity_tickets' ])) {
// Cache already loaded
2020-04-16 00:42:57 +02:00
return 0 ;
}
$sql = " SELECT rowid, code, label, use_default, pos, description " ;
$sql .= " FROM " . MAIN_DB_PREFIX . " c_ticket_severity " ;
2023-09-27 00:05:36 +02:00
$sql .= " WHERE entity IN ( " . getEntity ( 'c_ticket_severity' ) . " ) " ;
2023-09-23 10:05:36 +02:00
$sql .= " AND active > 0 " ;
2020-04-16 00:42:57 +02:00
$sql .= " ORDER BY pos " ;
2021-08-27 22:42:04 +02:00
dol_syslog ( get_class ( $this ) . " ::loadCacheSeveritiesTickets " , LOG_DEBUG );
2020-04-16 00:42:57 +02:00
$resql = $this -> db -> query ( $sql );
if ( $resql ) {
$num = $this -> db -> num_rows ( $resql );
$i = 0 ;
while ( $i < $num ) {
$obj = $this -> db -> fetch_object ( $resql );
2024-04-02 13:18:38 +02:00
$conf -> cache [ 'severity_tickets' ][ $obj -> rowid ][ 'code' ] = $obj -> code ;
2023-12-27 12:12:20 +01:00
$label = ( $langs -> trans ( " TicketSeverityShort " . $obj -> code ) != " TicketSeverityShort " . $obj -> code ? $langs -> trans ( " TicketSeverityShort " . $obj -> code ) : ( $obj -> label != '-' ? $obj -> label : '' ));
2024-04-02 13:18:38 +02:00
$conf -> cache [ 'severity_tickets' ][ $obj -> rowid ][ 'label' ] = $label ;
$conf -> cache [ 'severity_tickets' ][ $obj -> rowid ][ 'use_default' ] = $obj -> use_default ;
$conf -> cache [ 'severity_tickets' ][ $obj -> rowid ][ 'pos' ] = $obj -> pos ;
2020-04-16 00:42:57 +02:00
$i ++ ;
}
return $num ;
} else {
dol_print_error ( $this -> db );
return - 1 ;
}
}
/**
* Return status label of object
*
2021-11-01 02:16:29 +01:00
* @ param int $mode 0 = long label , 1 = short label , 2 = Picto + short label , 3 = Picto , 4 = Picto + long label , 5 = Short label + Picto , 6 = Long label + Picto
* @ return string Label
2020-04-16 00:42:57 +02:00
*/
public function getLibStatut ( $mode = 0 )
{
2024-02-08 13:58:40 +01:00
return $this -> LibStatut ( $this -> status , $mode , 0 , $this -> progress );
2020-04-16 00:42:57 +02:00
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
2024-02-08 02:07:05 +01:00
* Return status label of object
2020-04-16 00:42:57 +02:00
*
2024-09-05 16:05:37 +02:00
* @ param int $status Id status
2024-02-08 02:07:05 +01:00
* @ param int $mode 0 = long label , 1 = short label , 2 = Picto + short label , 3 = Picto , 4 = Picto + long label , 5 = Short label + Picto , 6 = Long label + Picto
* @ param int $notooltip 1 = No tooltip
* @ param int $progress Progression ( 0 to 100 )
* @ return string Label
2020-04-16 00:42:57 +02:00
*/
2021-11-01 02:16:29 +01:00
public function LibStatut ( $status , $mode = 0 , $notooltip = 0 , $progress = 0 )
2020-04-16 00:42:57 +02:00
{
// phpcs:enable
2023-03-17 10:58:41 +01:00
global $langs , $hookmanager ;
2020-04-16 00:42:57 +02:00
2024-02-27 00:14:22 +01:00
$labelStatus = ( isset ( $status ) && ! empty ( $this -> labelStatus [ $status ])) ? $this -> labelStatus [ $status ] : '' ;
2024-03-11 12:55:55 +01:00
$labelStatusShort = ( isset ( $status ) && ! empty ( $this -> labelStatusShort [ $status ])) ? $this -> labelStatusShort [ $status ] : '' ;
2024-02-08 02:07:05 +01:00
switch ( $status ) {
2024-02-08 15:09:42 +01:00
case self :: STATUS_NOT_READ : // Not read
2024-02-08 02:07:05 +01:00
$statusType = 'status0' ;
break ;
2024-02-08 15:09:42 +01:00
case self :: STATUS_READ : // Read
2024-02-08 02:07:05 +01:00
$statusType = 'status1' ;
break ;
2024-02-08 15:09:42 +01:00
case self :: STATUS_ASSIGNED : // Assigned
2024-02-08 02:07:05 +01:00
$statusType = 'status2' ;
break ;
2024-02-08 15:09:42 +01:00
case self :: STATUS_IN_PROGRESS : // In progress
2024-02-08 02:07:05 +01:00
$statusType = 'status4' ;
break ;
2024-02-08 15:09:42 +01:00
case self :: STATUS_WAITING : // Waiting/pending/suspended
2024-02-08 02:07:05 +01:00
$statusType = 'status7' ;
break ;
2024-02-08 15:09:42 +01:00
case self :: STATUS_NEED_MORE_INFO : // Waiting more information from the requester
2024-02-08 02:07:05 +01:00
$statusType = 'status3' ;
break ;
2024-02-08 15:09:42 +01:00
case self :: STATUS_CANCELED : // Canceled
2024-02-08 02:07:05 +01:00
$statusType = 'status9' ;
break ;
2024-02-08 15:09:42 +01:00
case self :: STATUS_CLOSED : // Closed
2024-02-08 02:07:05 +01:00
$statusType = 'status6' ;
break ;
default :
$labelStatus = 'Unknown' ;
$labelStatusShort = 'Unknown' ;
$statusType = 'status0' ;
$mode = 0 ;
2020-04-25 17:18:57 +02:00
}
2023-03-17 10:58:41 +01:00
$parameters = array (
'status' => $status ,
'mode' => $mode ,
);
2023-03-18 00:33:51 +01:00
// Note that $action and $object may have been modified by hook
$reshook = $hookmanager -> executeHooks ( 'LibStatut' , $parameters , $this );
2023-03-17 10:58:41 +01:00
if ( $reshook > 0 ) {
return $hookmanager -> resPrint ;
}
2020-12-17 11:57:12 +01:00
$params = array ();
if ( $notooltip ) {
$params = array ( 'tooltip' => 'no' );
}
2021-11-01 02:16:29 +01:00
$labelStatus = $langs -> transnoentitiesnoconv ( $labelStatus );
$labelStatusShort = $langs -> transnoentitiesnoconv ( $labelStatusShort );
if ( $status == self :: STATUS_IN_PROGRESS && $progress > 0 ) {
$labelStatus .= ' (' . round ( $progress ) . '%)' ;
$labelStatusShort .= ' (' . round ( $progress ) . '%)' ;
}
return dolGetStatus ( $labelStatus , $labelStatusShort , '' , $statusType , $mode , '' , $params );
2020-04-16 00:42:57 +02:00
}
2023-02-07 13:55:36 +01:00
/**
* getTooltipContentArray
2024-09-23 03:24:19 +02:00
* @ param array < string , mixed > $params params to construct tooltip data
2023-02-07 13:55:36 +01:00
* @ since v18
2024-09-23 03:24:19 +02:00
* @ return array { picto ? : string , ref ? : string , refsupplier ? : string , label ? : string , date ? : string , date_echeance ? : string , amountht ? : string , total_ht ? : string , totaltva ? : string , amountlt1 ? : string , amountlt2 ? : string , amountrevenustamp ? : string , totalttc ? : string } | array { optimize : string }
2023-02-07 13:55:36 +01:00
*/
public function getTooltipContentArray ( $params )
{
global $langs ;
$langs -> load ( 'ticket' );
2023-02-22 01:09:23 +01:00
$nofetch = ! empty ( $params [ 'nofetch' ]);
2023-02-07 13:55:36 +01:00
2023-02-22 01:09:23 +01:00
$datas = array ();
2023-02-07 13:55:36 +01:00
$datas [ 'picto' ] = img_picto ( '' , $this -> picto ) . ' <u class="paddingrightonly">' . $langs -> trans ( " Ticket " ) . '</u>' ;
$datas [ 'picto' ] .= ' ' . $this -> getLibStatut ( 4 );
$datas [ 'ref' ] = '<br><b>' . $langs -> trans ( 'Ref' ) . ':</b> ' . $this -> ref ;
$datas [ 'track_id' ] = '<br><b>' . $langs -> trans ( 'TicketTrackId' ) . ':</b> ' . $this -> track_id ;
$datas [ 'subject' ] = '<br><b>' . $langs -> trans ( 'Subject' ) . ':</b> ' . $this -> subject ;
if ( $this -> date_creation ) {
2023-02-12 21:01:02 +01:00
$datas [ 'date_creation' ] = '<br><b>' . $langs -> trans ( 'DateCreation' ) . ':</b> ' . dol_print_date ( $this -> date_creation , 'dayhour' );
2023-02-07 13:55:36 +01:00
}
if ( $this -> date_modification ) {
2023-02-12 21:01:02 +01:00
$datas [ 'date_modification' ] = '<br><b>' . $langs -> trans ( 'DateModification' ) . ':</b> ' . dol_print_date ( $this -> date_modification , 'dayhour' );
2023-02-07 13:55:36 +01:00
}
2023-02-12 23:13:45 +01:00
// show categories for this record only in ajax to not overload lists
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'category' ) && ! $nofetch ) {
2023-02-12 23:13:45 +01:00
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php' ;
$form = new Form ( $this -> db );
$datas [ 'categories' ] = '<br>' . $form -> showCategories ( $this -> id , Categorie :: TYPE_TICKET , 1 );
}
2023-02-07 13:55:36 +01:00
return $datas ;
}
2020-04-16 00:42:57 +02:00
/**
2024-01-12 17:18:52 +01:00
* Return a link to the object card ( with optionally the picto )
2020-04-16 00:42:57 +02:00
*
* @ param int $withpicto Include picto in link ( 0 = No picto , 1 = Include picto into link , 2 = Only picto )
* @ param string $option On what the link point to ( 'nolink' , ... )
* @ param int $notooltip 1 = Disable tooltip
* @ param string $morecss Add more css on link
* @ param int $save_lastsearch_value - 1 = Auto , 0 = No save of lastsearch_values when clicking , 1 = Save lastsearch_values whenclicking
* @ return string String with URL
*/
public function getNomUrl ( $withpicto = 0 , $option = '' , $notooltip = 0 , $morecss = '' , $save_lastsearch_value = - 1 )
{
2024-06-07 16:23:56 +02:00
global $action , $conf , $hookmanager , $langs ;
2020-04-16 00:42:57 +02:00
2021-02-26 13:27:00 +01:00
if ( ! empty ( $conf -> dol_no_mouse_hover )) {
$notooltip = 1 ; // Force disable tooltips
}
2020-04-16 00:42:57 +02:00
$result = '' ;
2023-02-07 13:55:36 +01:00
$params = [
'id' => $this -> id ,
'objecttype' => $this -> element ,
2023-02-12 23:13:45 +01:00
'option' => $option ,
'nofetch' => 1 ,
2023-02-07 13:55:36 +01:00
];
$classfortooltip = 'classfortooltip' ;
$dataparams = '' ;
if ( getDolGlobalInt ( 'MAIN_ENABLE_AJAX_TOOLTIP' )) {
$classfortooltip = 'classforajaxtooltip' ;
2023-04-03 19:51:40 +02:00
$dataparams = ' data-params="' . dol_escape_htmltag ( json_encode ( $params )) . '"' ;
$label = '' ;
} else {
$label = implode ( $this -> getTooltipContentArray ( $params ));
2022-05-15 22:29:19 +02:00
}
2023-02-07 13:55:36 +01:00
2021-09-18 19:34:46 +02:00
$url = DOL_URL_ROOT . '/ticket/card.php?id=' . $this -> id ;
2020-04-16 00:42:57 +02:00
2021-02-26 13:27:00 +01:00
if ( $option != 'nolink' ) {
2020-04-16 00:42:57 +02:00
// Add param to save lastsearch_values or not
$add_save_lastsearch_values = ( $save_lastsearch_value == 1 ? 1 : 0 );
2023-09-10 17:41:22 +02:00
if ( $save_lastsearch_value == - 1 && isset ( $_SERVER [ " PHP_SELF " ]) && preg_match ( '/list\.php/' , $_SERVER [ " PHP_SELF " ])) {
2021-02-26 13:27:00 +01:00
$add_save_lastsearch_values = 1 ;
}
if ( $add_save_lastsearch_values ) {
$url .= '&save_lastsearch_values=1' ;
}
2020-04-16 00:42:57 +02:00
}
$linkclose = '' ;
2021-02-26 13:27:00 +01:00
if ( empty ( $notooltip )) {
2023-11-27 12:08:48 +01:00
if ( getDolGlobalString ( 'MAIN_OPTIMIZEFORTEXTBROWSER' )) {
2020-04-16 00:42:57 +02:00
$label = $langs -> trans ( " ShowTicket " );
2025-01-09 02:01:49 +01:00
$linkclose .= ' alt="' . dolPrintHTMLForAttribute ( $label ) . '"' ;
2020-04-16 00:42:57 +02:00
}
2025-01-09 02:01:49 +01:00
$linkclose .= ( $label ? ' title="' . dolPrintHTMLForAttribute ( $label ) . '"' : ' title="tocomplete"' );
2023-04-03 19:51:40 +02:00
$linkclose .= $dataparams . ' class="' . $classfortooltip . ( $morecss ? ' ' . $morecss : '' ) . '"' ;
2021-02-26 13:27:00 +01:00
} else {
$linkclose = ( $morecss ? ' class="' . $morecss . '"' : '' );
}
2020-04-16 00:42:57 +02:00
$linkstart = '<a href="' . $url . '"' ;
$linkstart .= $linkclose . '>' ;
$linkend = '</a>' ;
$result .= $linkstart ;
2021-02-26 13:27:00 +01:00
if ( $withpicto ) {
2024-08-31 19:43:58 +02:00
$result .= img_object (( $notooltip ? '' : $label ), ( $this -> picto ? : 'generic' ), (( $withpicto != 2 ) ? 'class="paddingright"' : '' ), 0 , 0 , $notooltip ? 0 : 1 );
2021-02-26 13:27:00 +01:00
}
if ( $withpicto != 2 ) {
$result .= $this -> ref ;
}
2020-04-16 00:42:57 +02:00
$result .= $linkend ;
//if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : '');
2024-06-07 16:23:56 +02:00
$hookmanager -> initHooks ( array ( 'ticketdao' ));
$parameters = array ( 'id' => $this -> id , 'getnomurl' => & $result );
$reshook = $hookmanager -> executeHooks ( 'getNomUrl' , $parameters , $this , $action ); // Note that $action and $object may have been modified by some hooks
if ( $reshook > 0 ) {
$result = $hookmanager -> resPrint ;
} else {
$result .= $hookmanager -> resPrint ;
}
2020-04-16 00:42:57 +02:00
return $result ;
}
/**
* Mark a message as read
*
2023-05-30 13:21:07 +02:00
* @ param User $user Object user
* @ param int $notrigger No trigger
2023-12-06 15:46:39 +01:00
* @ return int Return integer < 0 if KO , 0 = nothing done , > 0 if OK
2020-04-16 00:42:57 +02:00
*/
public function markAsRead ( $user , $notrigger = 0 )
{
2023-05-30 13:21:07 +02:00
global $langs ;
2020-04-16 00:42:57 +02:00
$error = 0 ;
2024-04-22 18:57:21 +02:00
if ( $this -> status != self :: STATUS_CANCELED ) { // no closed
$this -> oldcopy = dol_clone ( $this , 2 );
2022-08-22 15:06:09 +02:00
2020-04-16 00:42:57 +02:00
$this -> db -> begin ();
2024-10-03 20:42:36 +02:00
$this -> status = Ticket :: STATUS_READ ;
2020-04-16 00:42:57 +02:00
$sql = " UPDATE " . MAIN_DB_PREFIX . " ticket " ;
2022-08-22 15:06:09 +02:00
$sql .= " SET fk_statut = " . Ticket :: STATUS_READ . " , date_read = ' " . $this -> db -> idate ( dol_now ()) . " ' " ;
2021-08-27 16:33:03 +02:00
$sql .= " WHERE rowid = " . (( int ) $this -> id );
2020-04-16 00:42:57 +02:00
dol_syslog ( get_class ( $this ) . " ::markAsRead " );
$resql = $this -> db -> query ( $sql );
if ( $resql ) {
2023-08-05 14:59:31 +02:00
$this -> context [ 'actionmsg' ] = $langs -> trans ( 'TicketLogMesgReadBy' , $this -> ref , $user -> getFullName ( $langs ));
$this -> context [ 'actionmsg2' ] = $langs -> trans ( 'TicketLogMesgReadBy' , $this -> ref , $user -> getFullName ( $langs ));
2020-04-16 00:42:57 +02:00
2024-08-31 19:43:58 +02:00
if ( ! $notrigger ) {
2020-04-16 00:42:57 +02:00
// Call trigger
$result = $this -> call_trigger ( 'TICKET_MODIFY' , $user );
if ( $result < 0 ) {
$error ++ ;
}
// End call triggers
}
if ( ! $error ) {
$this -> db -> commit ();
return 1 ;
} else {
2024-10-03 20:42:36 +02:00
$this -> status = $this -> oldcopy -> status ;
2020-04-16 00:42:57 +02:00
$this -> db -> rollback ();
Qual: Apply automatic phan fixes (deprecations, unneeded imports) (#28154)
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
2024-02-13 21:46:12 +01:00
$this -> error = implode ( ',' , $this -> errors );
2020-04-16 00:42:57 +02:00
dol_syslog ( get_class ( $this ) . " ::markAsRead " . $this -> error , LOG_ERR );
return - 1 ;
}
} else {
2024-10-03 20:42:36 +02:00
$this -> status = $this -> oldcopy -> status ;
2020-04-16 00:42:57 +02:00
$this -> db -> rollback ();
$this -> error = $this -> db -> lasterror ();
dol_syslog ( get_class ( $this ) . " ::markAsRead " . $this -> error , LOG_ERR );
return - 1 ;
}
}
2023-05-30 13:21:07 +02:00
return 0 ;
2020-04-16 00:42:57 +02:00
}
/**
2023-09-11 19:02:03 +02:00
* Set an assigned user to a ticket .
2020-04-16 00:42:57 +02:00
*
2024-10-19 01:21:41 +02:00
* @ param User $user Object user
* @ param int $id_assign_user ID of user assigned
* @ param int < 0 , 1 > $notrigger Disable trigger
* @ return int Return integer < 0 if KO , 0 = Nothing done , > 0 if OK
2020-04-16 00:42:57 +02:00
*/
public function assignUser ( $user , $id_assign_user , $notrigger = 0 )
{
$error = 0 ;
2024-04-22 18:57:21 +02:00
$this -> oldcopy = dol_clone ( $this , 2 );
2020-04-16 00:42:57 +02:00
2022-08-22 15:06:09 +02:00
$this -> db -> begin ();
2020-04-16 00:42:57 +02:00
$sql = " UPDATE " . MAIN_DB_PREFIX . " ticket " ;
2021-02-26 13:27:00 +01:00
if ( $id_assign_user > 0 ) {
2021-04-25 15:55:36 +02:00
$sql .= " SET fk_user_assign= " . (( int ) $id_assign_user ) . " , fk_statut = " . Ticket :: STATUS_ASSIGNED ;
2020-05-21 15:05:19 +02:00
} else {
2020-04-16 00:42:57 +02:00
$sql .= " SET fk_user_assign=null, fk_statut = " . Ticket :: STATUS_READ ;
}
2021-08-27 16:33:03 +02:00
$sql .= " WHERE rowid = " . (( int ) $this -> id );
2020-04-16 00:42:57 +02:00
dol_syslog ( get_class ( $this ) . " ::assignUser sql= " . $sql );
$resql = $this -> db -> query ( $sql );
2021-02-26 13:27:00 +01:00
if ( $resql ) {
2020-04-16 00:42:57 +02:00
$this -> fk_user_assign = $id_assign_user ; // May be used by trigger
if ( ! $notrigger ) {
// Call trigger
$result = $this -> call_trigger ( 'TICKET_ASSIGNED' , $user );
if ( $result < 0 ) {
$error ++ ;
}
// End call triggers
}
if ( ! $error ) {
$this -> db -> commit ();
return 1 ;
} else {
$this -> db -> rollback ();
Qual: Apply automatic phan fixes (deprecations, unneeded imports) (#28154)
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
2024-02-13 21:46:12 +01:00
$this -> error = implode ( ',' , $this -> errors );
2020-04-16 00:42:57 +02:00
dol_syslog ( get_class ( $this ) . " ::assignUser " . $this -> error , LOG_ERR );
return - 1 ;
}
} else {
$this -> db -> rollback ();
$this -> error = $this -> db -> lasterror ();
dol_syslog ( get_class ( $this ) . " ::assignUser " . $this -> error , LOG_ERR );
return - 1 ;
}
}
/**
* Add message into database
*
2024-08-31 19:43:58 +02:00
* @ param User $user User that creates
2024-10-19 01:21:41 +02:00
* @ param int < 0 , 1 > $notrigger 0 = launch triggers after , 1 = disable triggers
* @ param string [] $filename_list List of files to attach ( full path of filename on file system )
* @ param string [] $mimetype_list List of MIME type of attached files
* @ param string [] $mimefilename_list List of attached file name in message
* @ param bool $send_email Whether the message is sent by email
* @ param int < 0 , 1 > $public_area 0 = Default , 1 if we are creating the message from a public area ( so we can search contact from email to add it as contact of ticket if TICKET_ASSIGN_CONTACT_TO_MESSAGE is set )
2024-08-31 19:43:58 +02:00
* @ return int Return integer < 0 if KO , > 0 if OK
2023-11-09 10:56:13 +01:00
*/
public function createTicketMessage ( $user , $notrigger = 0 , $filename_list = array (), $mimetype_list = array (), $mimefilename_list = array (), $send_email = false , $public_area = 0 )
2020-04-16 00:42:57 +02:00
{
2024-08-31 19:43:58 +02:00
global $conf ;
2020-04-16 00:42:57 +02:00
$error = 0 ;
$now = dol_now ();
// Clean parameters
if ( isset ( $this -> fk_track_id )) {
$this -> fk_track_id = trim ( $this -> fk_track_id );
}
if ( isset ( $this -> message )) {
$this -> message = trim ( $this -> message );
}
$this -> db -> begin ();
// Insert entry into agenda with code 'TICKET_MSG'
include_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php' ;
$actioncomm = new ActionComm ( $this -> db );
2022-11-25 12:11:51 +01:00
$actioncomm -> type_code = 'AC_OTH_AUTO' ; // This is not an entry that must appears into manual calendar but only into CRM calendar
2020-04-16 00:42:57 +02:00
$actioncomm -> code = 'TICKET_MSG' ;
if ( $this -> private ) {
$actioncomm -> code = 'TICKET_MSG_PRIVATE' ;
}
2022-09-15 10:05:40 +02:00
if ( $send_email ) {
2022-11-25 12:11:51 +01:00
$actioncomm -> code .= '_SENTBYMAIL' ;
2022-09-14 14:29:50 +02:00
}
2023-04-27 11:02:22 +02:00
if (( empty ( $user -> id ) || $user -> id == 0 ) && isset ( $_SESSION [ 'email_customer' ])) {
$actioncomm -> email_from = $_SESSION [ 'email_customer' ];
}
2020-04-16 00:42:57 +02:00
$actioncomm -> socid = $this -> socid ;
$actioncomm -> label = $this -> subject ;
$actioncomm -> note_private = $this -> message ;
2024-03-18 19:50:22 +01:00
$actioncomm -> userassigned = array ( $user -> id => array ( 'id' => $user -> id , 'transparency' => 0 ));
2020-04-16 00:42:57 +02:00
$actioncomm -> userownerid = $user -> id ;
$actioncomm -> datep = $now ;
2021-10-18 09:46:20 +02:00
$actioncomm -> percentage = - 1 ; // percentage is not relevant for punctual events
2020-04-16 00:42:57 +02:00
$actioncomm -> elementtype = 'ticket' ;
$actioncomm -> fk_element = $this -> id ;
2022-11-13 00:38:15 +01:00
$actioncomm -> fk_project = $this -> fk_project ;
2020-04-16 00:42:57 +02:00
2024-09-20 00:19:36 +02:00
// Add first contact id found in database from submitter email entered into public interface
// Feature disabled: This has a security trouble. The public interface is a no login interface, so being able to show the contact info from an
// email decided by the submiter allows anybody to get information on any contact (customer or supplier) in Dolibarr database.
// He can even check if contact exists by trying any email if this feature is enabled.
2023-11-27 12:08:48 +01:00
if ( $public_area && ! empty ( $this -> origin_email ) && getDolGlobalString ( 'TICKET_ASSIGN_CONTACT_TO_MESSAGE' )) {
2023-10-11 03:36:15 +02:00
$contacts = $this -> searchContactByEmail ( $this -> origin_email );
if ( ! empty ( $contacts )) {
// Ensure that contact is active and select first active contact
foreach ( $contacts as $contact ) {
if (( int ) $contact -> statut == 1 ) {
$actioncomm -> contact_id = $contact -> id ;
break ;
}
}
}
}
2020-04-16 00:42:57 +02:00
$attachedfiles = array ();
$attachedfiles [ 'paths' ] = $filename_list ;
$attachedfiles [ 'names' ] = $mimefilename_list ;
$attachedfiles [ 'mimes' ] = $mimetype_list ;
if ( is_array ( $attachedfiles ) && count ( $attachedfiles ) > 0 ) {
$actioncomm -> attachedfiles = $attachedfiles ;
}
2024-04-24 15:18:45 +02:00
//if (!empty($mimefilename_list) && is_array($mimefilename_list)) {
// $actioncomm->note_private = dol_concatdesc($actioncomm->note_private, "\n".$langs->transnoentities("AttachedFiles").': '.implode(';', $mimefilename_list));
//}
2020-04-16 00:42:57 +02:00
$actionid = $actioncomm -> create ( $user );
2021-02-26 13:27:00 +01:00
if ( $actionid <= 0 ) {
2020-04-16 00:42:57 +02:00
$error ++ ;
$this -> error = $actioncomm -> error ;
$this -> errors = $actioncomm -> errors ;
}
2024-04-24 15:18:45 +02:00
if ( $actionid > 0 ) {
if ( is_array ( $attachedfiles ) && array_key_exists ( 'paths' , $attachedfiles ) && count ( $attachedfiles [ 'paths' ]) > 0 ) {
2024-10-03 15:04:32 +02:00
// If there is some files, we must now link them to the event, so we can show them per event.
2024-04-24 15:18:45 +02:00
foreach ( $attachedfiles [ 'paths' ] as $key => $filespath ) {
2024-10-03 15:04:32 +02:00
// Disabled the move into another directory, Files for a ticket should be stored into ticket directory. It generates too much troubles.
2024-10-03 16:13:51 +02:00
$destdir = $conf -> ticket -> dir_output . '/' . $this -> ref ;
2024-10-03 15:04:32 +02:00
//$destfile = $destdir.'/'.$attachedfiles['names'][$key];
//if (dol_mkdir($destdir) >= 0) {
2024-10-03 15:50:44 +02:00
//require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
//dol_move($filespath, $destfile); // Disabled, a file for a ticket should be stored into ticket directory. It generates big trouble.
2024-10-04 08:25:17 +02:00
if ( in_array ( $actioncomm -> code , array ( 'TICKET_MSG' , 'TICKET_MSG_SENTBYMAIL' ))) {
2024-10-03 15:04:32 +02:00
$ecmfile = new EcmFiles ( $this -> db );
$destdir = preg_replace ( '/^' . preg_quote ( DOL_DATA_ROOT , '/' ) . '/' , '' , $destdir );
$destdir = preg_replace ( '/[\\/]$/' , '' , $destdir );
$destdir = preg_replace ( '/^[\\/]/' , '' , $destdir );
2024-10-03 16:13:51 +02:00
$result = $ecmfile -> fetch ( 0 , '' , $destdir . '/' . $attachedfiles [ 'names' ][ $key ]);
2024-10-03 15:04:32 +02:00
// TODO We must add a column into ecm_files table agenda_id to store the ID of event.
// $ecmfile->agenda_id = $actionid;
// Disabled, serious security hole. A file published into the ERP should not become public for everybody.
//require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
//$ecmfile->share = getRandomPassword(true);
2024-10-03 16:13:51 +02:00
if ( $result > 0 ) {
$result = $ecmfile -> update ( $user );
if ( $result < 0 ) {
setEventMessages ( $ecmfile -> error , $ecmfile -> errors , 'warnings' );
}
2024-04-24 15:18:45 +02:00
}
}
2024-10-03 15:04:32 +02:00
//}
2024-04-24 15:18:45 +02:00
}
}
}
2020-04-16 00:42:57 +02:00
// Commit or rollback
if ( $error ) {
$this -> db -> rollback ();
return - 1 * $error ;
} else {
$this -> db -> commit ();
return 1 ;
}
}
/**
* Load the list of event on ticket into -> cache_msgs_ticket
*
* @ return int Number of lines loaded , 0 if already loaded , < 0 if KO
*/
public function loadCacheMsgsTicket ()
{
2022-11-08 16:27:04 +01:00
if ( ! empty ( $this -> cache_msgs_ticket ) && is_array ( $this -> cache_msgs_ticket ) && count ( $this -> cache_msgs_ticket )) {
2020-04-16 00:42:57 +02:00
return 0 ;
}
// Cache already loaded
2023-09-08 15:26:21 +02:00
$sql = " SELECT id as rowid, fk_user_author, email_from, datec, datep, label, note as message, code " ;
2020-04-16 00:42:57 +02:00
$sql .= " FROM " . MAIN_DB_PREFIX . " actioncomm " ;
$sql .= " WHERE fk_element = " . ( int ) $this -> id ;
$sql .= " AND elementtype = 'ticket' " ;
2023-09-05 16:19:20 +02:00
$sql .= " ORDER BY datep DESC " ;
2020-04-16 00:42:57 +02:00
2021-08-27 22:42:04 +02:00
dol_syslog ( get_class ( $this ) . " ::load_cache_actions_ticket " , LOG_DEBUG );
2020-04-16 00:42:57 +02:00
$resql = $this -> db -> query ( $sql );
if ( $resql ) {
$num = $this -> db -> num_rows ( $resql );
$i = 0 ;
while ( $i < $num ) {
$obj = $this -> db -> fetch_object ( $resql );
$this -> cache_msgs_ticket [ $i ][ 'id' ] = $obj -> rowid ;
$this -> cache_msgs_ticket [ $i ][ 'fk_user_author' ] = $obj -> fk_user_author ;
2024-07-28 14:54:06 +02:00
if ( in_array ( $obj -> code , array ( 'TICKET_MSG' , 'AC_TICKET_CREATE' )) && empty ( $obj -> fk_user_author )) {
2023-04-27 11:02:22 +02:00
$this -> cache_msgs_ticket [ $i ][ 'fk_contact_author' ] = $obj -> email_from ;
}
2020-04-16 00:42:57 +02:00
$this -> cache_msgs_ticket [ $i ][ 'datec' ] = $this -> db -> jdate ( $obj -> datec );
2023-09-05 16:19:20 +02:00
$this -> cache_msgs_ticket [ $i ][ 'datep' ] = $this -> db -> jdate ( $obj -> datep );
2020-04-16 00:42:57 +02:00
$this -> cache_msgs_ticket [ $i ][ 'subject' ] = $obj -> label ;
$this -> cache_msgs_ticket [ $i ][ 'message' ] = $obj -> message ;
2022-11-25 12:11:51 +01:00
$this -> cache_msgs_ticket [ $i ][ 'private' ] = ( preg_match ( '/^TICKET_MSG_PRIVATE/' , $obj -> code ) ? 1 : 0 );
2020-04-16 00:42:57 +02:00
$i ++ ;
}
return $num ;
} else {
$this -> error = " Error " . $this -> db -> lasterror ();
dol_syslog ( get_class ( $this ) . " ::load_cache_actions_ticket " . $this -> error , LOG_ERR );
return - 1 ;
}
}
/**
* Close a ticket
*
2021-07-30 00:40:06 +02:00
* @ param User $user User that close
2024-01-12 17:18:52 +01:00
* @ param int $mode 0 = Close solved , 1 = Close abandoned
2023-12-06 15:46:39 +01:00
* @ return int Return integer < 0 if KO , 0 = nothing done , > 0 if OK
2020-04-16 00:42:57 +02:00
*/
2021-07-30 00:40:06 +02:00
public function close ( User $user , $mode = 0 )
2020-04-16 00:42:57 +02:00
{
2023-05-30 13:21:07 +02:00
if ( $this -> status != Ticket :: STATUS_CLOSED && $this -> status != Ticket :: STATUS_CANCELED ) { // not closed
2020-04-16 00:42:57 +02:00
$this -> db -> begin ();
$sql = " UPDATE " . MAIN_DB_PREFIX . " ticket " ;
2021-07-30 00:40:06 +02:00
$sql .= " SET fk_statut= " . ( $mode ? Ticket :: STATUS_CANCELED : Ticket :: STATUS_CLOSED ) . " , progress=100, date_close=' " . $this -> db -> idate ( dol_now ()) . " ' " ;
$sql .= " WHERE rowid = " . (( int ) $this -> id );
2020-04-16 00:42:57 +02:00
2021-07-30 00:40:06 +02:00
dol_syslog ( get_class ( $this ) . " ::close mode= " . $mode );
2020-04-16 00:42:57 +02:00
$resql = $this -> db -> query ( $sql );
if ( $resql ) {
$error = 0 ;
// Valid and close fichinter linked
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'intervention' ) && getDolGlobalString ( 'WORKFLOW_TICKET_CLOSE_INTERVENTION' )) {
2020-08-28 19:07:17 +02:00
dol_syslog ( " We have closed the ticket, so we close all linked interventions " );
$this -> fetchObjectLinked ( $this -> id , $this -> element , null , 'fichinter' );
2021-02-26 13:27:00 +01:00
if ( $this -> linkedObjectsIds ) {
2020-08-28 19:07:17 +02:00
foreach ( $this -> linkedObjectsIds [ 'fichinter' ] as $fichinter_id ) {
$fichinter = new Fichinter ( $this -> db );
$fichinter -> fetch ( $fichinter_id );
if ( $fichinter -> statut == 0 ) {
$result = $fichinter -> setValid ( $user );
if ( ! $result ) {
$this -> errors [] = $fichinter -> error ;
$error ++ ;
}
2020-04-16 00:42:57 +02:00
}
2020-08-28 19:07:17 +02:00
if ( $fichinter -> statut < 3 ) {
$result = $fichinter -> setStatut ( 3 );
if ( ! $result ) {
$this -> errors [] = $fichinter -> error ;
$error ++ ;
}
2020-04-16 00:42:57 +02:00
}
}
}
}
// Call trigger
$result = $this -> call_trigger ( 'TICKET_CLOSE' , $user );
if ( $result < 0 ) {
$error ++ ;
}
// End call triggers
if ( ! $error ) {
$this -> db -> commit ();
return 1 ;
} else {
$this -> db -> rollback ();
Qual: Apply automatic phan fixes (deprecations, unneeded imports) (#28154)
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
* Qual: Apply automatic phan fixes (deprecations, unneeded imports)
# Qual: Apply automatic phan fixes (deprecations, unneeded imports)
This applies automatic fixes by phan for deprecated functions, unneeded imports).
2024-02-13 21:46:12 +01:00
$this -> error = implode ( ',' , $this -> errors );
2020-04-16 00:42:57 +02:00
dol_syslog ( get_class ( $this ) . " ::close " . $this -> error , LOG_ERR );
return - 1 ;
}
} else {
$this -> db -> rollback ();
$this -> error = $this -> db -> lasterror ();
dol_syslog ( get_class ( $this ) . " ::close " . $this -> error , LOG_ERR );
return - 1 ;
}
}
2023-05-30 13:21:07 +02:00
return 0 ;
2020-04-16 00:42:57 +02:00
}
/**
* Search and fetch thirparties by email
*
2024-10-19 01:21:41 +02:00
* @ param string $email Email
* @ param int < 0 , 3 > $type Type of thirdparties ( 0 = any , 1 = customer , 2 = prospect , 3 = supplier )
* @ param array < string , mixed > $filters Array of couple field name / value to filter the companies with the same name
* @ param string $clause Clause for filters
* @ return Societe [] | int <- 1 , - 1 > Array of thirdparties object
2020-04-16 00:42:57 +02:00
*/
2024-01-12 17:07:22 +01:00
public function searchSocidByEmail ( $email , $type = 0 , $filters = array (), $clause = 'AND' )
2020-04-16 00:42:57 +02:00
{
$thirdparties = array ();
2021-06-09 15:36:47 +02:00
$exact = 0 ;
2020-04-16 00:42:57 +02:00
// Generation requete recherche
$sql = " SELECT rowid FROM " . MAIN_DB_PREFIX . " societe " ;
$sql .= " WHERE entity IN ( " . getEntity ( 'ticket' , 1 ) . " ) " ;
if ( ! empty ( $type )) {
if ( $type == 1 || $type == 2 ) {
2021-06-09 15:36:47 +02:00
$sql .= " AND client = " . (( int ) $type );
2020-04-16 00:42:57 +02:00
} elseif ( $type == 3 ) {
$sql .= " AND fournisseur = 1 " ;
}
}
if ( ! empty ( $email )) {
2021-06-14 13:51:09 +02:00
if ( empty ( $exact )) {
2021-06-09 15:36:47 +02:00
$regs = array ();
2020-04-16 00:42:57 +02:00
if ( preg_match ( '/^([\*])?[^*]+([\*])?$/' , $email , $regs ) && count ( $regs ) > 1 ) {
$email = str_replace ( '*' , '%' , $email );
} else {
$email = '%' . $email . '%' ;
}
}
$sql .= " AND " ;
if ( is_array ( $filters ) && ! empty ( $filters )) {
$sql .= " ( " ;
}
2021-06-14 13:51:09 +02:00
$sql .= " email LIKE ' " . $this -> db -> escape ( $email ) . " ' " ;
2020-04-16 00:42:57 +02:00
}
if ( is_array ( $filters ) && ! empty ( $filters )) {
foreach ( $filters as $field => $value ) {
2025-01-20 03:54:04 +01:00
$sql .= " " . $clause . " " . $this -> db -> sanitize ( $field ) . " LIKE ' " . $this -> db -> escape ( $value ) . " ' " ;
2020-04-16 00:42:57 +02:00
}
if ( ! empty ( $email )) {
$sql .= " ) " ;
}
}
$res = $this -> db -> query ( $sql );
if ( $res ) {
while ( $rec = $this -> db -> fetch_array ( $res )) {
$soc = new Societe ( $this -> db );
$soc -> fetch ( $rec [ 'rowid' ]);
$thirdparties [] = $soc ;
}
return $thirdparties ;
} else {
$this -> error = $this -> db -> error () . ' sql=' . $sql ;
dol_syslog ( get_class ( $this ) . " ::searchSocidByEmail " . $this -> error , LOG_ERR );
return - 1 ;
}
}
/**
* Search and fetch contacts by email
*
2023-01-04 11:36:46 +01:00
* @ param string $email Email
2024-01-12 17:07:22 +01:00
* @ param int $socid Limit to a thirdparty
2023-01-04 11:36:46 +01:00
* @ param string $case Respect case
2024-10-19 01:21:41 +02:00
* @ return Contact [] | int Array of contacts object
2020-04-16 00:42:57 +02:00
*/
2024-01-12 17:07:22 +01:00
public function searchContactByEmail ( $email , $socid = 0 , $case = '' )
2020-04-16 00:42:57 +02:00
{
$contacts = array ();
2023-03-20 21:38:56 +01:00
// Forge the search SQL
2020-04-16 00:42:57 +02:00
$sql = " SELECT rowid FROM " . MAIN_DB_PREFIX . " socpeople " ;
2022-03-18 12:05:59 +01:00
$sql .= " WHERE entity IN ( " . getEntity ( 'contact' ) . " ) " ;
2020-04-16 00:42:57 +02:00
if ( ! empty ( $socid )) {
2023-03-20 21:38:56 +01:00
$sql .= " AND fk_soc = " . (( int ) $socid );
2020-04-16 00:42:57 +02:00
}
if ( ! empty ( $email )) {
$sql .= " AND " ;
if ( ! $case ) {
2023-03-20 21:38:56 +01:00
$sql .= " email = ' " . $this -> db -> escape ( $email ) . " ' " ;
2020-04-16 00:42:57 +02:00
} else {
2023-03-20 21:38:56 +01:00
$sql .= " email LIKE BINARY ' " . $this -> db -> escape ( $this -> db -> escapeforlike ( $email )) . " ' " ;
2020-04-16 00:42:57 +02:00
}
}
$res = $this -> db -> query ( $sql );
if ( $res ) {
2023-02-21 20:42:46 +01:00
while ( $rec = $this -> db -> fetch_object ( $res )) {
2020-04-16 00:42:57 +02:00
include_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php' ;
$contactstatic = new Contact ( $this -> db );
2023-02-21 20:42:46 +01:00
$contactstatic -> fetch ( $rec -> rowid );
2020-04-16 00:42:57 +02:00
$contacts [] = $contactstatic ;
}
return $contacts ;
} else {
$this -> error = $this -> db -> error () . ' sql=' . $sql ;
dol_syslog ( get_class ( $this ) . " ::searchContactByEmail " . $this -> error , LOG_ERR );
return - 1 ;
}
}
/**
* Define parent commany of current ticket
*
2023-01-04 11:36:46 +01:00
* @ param int $id Id of thirdparty to set or '' to remove
2023-12-01 19:51:32 +01:00
* @ return int Return integer < 0 if KO , > 0 if OK
2020-04-16 00:42:57 +02:00
*/
public function setCustomer ( $id )
{
if ( $this -> id ) {
$sql = " UPDATE " . MAIN_DB_PREFIX . " ticket " ;
2024-11-21 00:57:16 +01:00
$sql .= " SET fk_soc = " . ( $id > 0 ? ( int ) $id : " null " );
2021-08-27 16:33:03 +02:00
$sql .= " WHERE rowid = " . (( int ) $this -> id );
2020-04-16 00:42:57 +02:00
dol_syslog ( get_class ( $this ) . '::setCustomer sql=' . $sql );
$resql = $this -> db -> query ( $sql );
if ( $resql ) {
return 1 ;
} else {
return - 1 ;
}
} else {
return - 1 ;
}
}
/**
* Define progression of current ticket
*
* @ param int $percent Progression percent
2023-12-01 19:51:32 +01:00
* @ return int Return integer < 0 if KO , > 0 if OK
2020-04-16 00:42:57 +02:00
*/
public function setProgression ( $percent )
{
if ( $this -> id ) {
$sql = " UPDATE " . MAIN_DB_PREFIX . " ticket " ;
2024-11-21 00:57:16 +01:00
$sql .= " SET progress = " . ( $percent > 0 ? ( float ) $percent : " null " );
2021-08-27 16:33:03 +02:00
$sql .= " WHERE rowid = " . (( int ) $this -> id );
2020-04-16 00:42:57 +02:00
dol_syslog ( get_class ( $this ) . '::set_progression sql=' . $sql );
$resql = $this -> db -> query ( $sql );
if ( $resql ) {
return 1 ;
} else {
return - 1 ;
}
} else {
return - 1 ;
}
}
/**
* Link element with a contract
*
* @ param int $contractid Contract id to link element to
2023-12-01 19:51:32 +01:00
* @ return int Return integer < 0 if KO , > 0 if OK
2020-04-16 00:42:57 +02:00
*/
public function setContract ( $contractid )
{
2023-08-04 14:50:31 +02:00
if ( $this -> id ) {
$sql = " UPDATE " . MAIN_DB_PREFIX . " ticket " ;
2024-11-21 00:57:16 +01:00
$sql .= " SET fk_contract = " . ( $contractid > 0 ? ( int ) $contractid : " null " );
2023-08-04 14:50:31 +02:00
$sql .= " WHERE rowid = " . (( int ) $this -> id );
dol_syslog ( get_class ( $this ) . '::setContract sql=' . $sql );
$resql = $this -> db -> query ( $sql );
if ( $resql ) {
return 1 ;
} else {
return - 1 ;
}
2020-04-16 00:42:57 +02:00
} else {
return - 1 ;
}
}
/* gestion des contacts d'un ticket */
/**
* Return id des contacts interne de suivi
*
2024-10-19 01:21:41 +02:00
* @ return null | int [] Liste des id contacts suivi ticket
2020-04-16 00:42:57 +02:00
*/
public function getIdTicketInternalContact ()
{
return $this -> getIdContact ( 'internal' , 'SUPPORTTEC' );
}
/**
2024-01-12 17:18:52 +01:00
* Retrieve information about internal contacts
2020-04-16 00:42:57 +02:00
*
2024-03-19 01:31:47 +01:00
* @ param int $status Status of user or company array < array { id : int , email : string , firstname : string , lastname : string , libelle : string } >
* @ return array < array { id : int , email : string , firstname : string , lastname : string , libelle : string , socid : int , code : string , status : int } > Array with datas : firstname , lastname , socid ( - 1 for internal users ), email , code , libelle , status
2020-04-16 00:42:57 +02:00
*/
2023-03-03 14:53:06 +01:00
public function getInfosTicketInternalContact ( $status = - 1 )
2020-04-16 00:42:57 +02:00
{
2023-03-03 14:53:06 +01:00
return $this -> listeContact ( - 1 , 'internal' , 0 , '' , $status );
2020-04-16 00:42:57 +02:00
}
/**
* Return id des contacts clients pour le suivi ticket
*
2024-10-19 01:21:41 +02:00
* @ return null | int [] Liste des id contacts suivi ticket
2020-04-16 00:42:57 +02:00
*/
public function getIdTicketCustomerContact ()
{
return $this -> getIdContact ( 'external' , 'SUPPORTCLI' );
}
/**
2024-01-12 17:18:52 +01:00
* Retrieve information about external contacts
2020-04-16 00:42:57 +02:00
*
2023-03-03 14:53:06 +01:00
* @ param int $status Status of user or company
2024-10-19 01:21:41 +02:00
* @ return array < int | array { source : string , id : int , rowid : int , email : string , civility : string , firstname : string , lastname : string , labeltype : string , libelle : string , socid : int , code : string , status : int , statuscontact : string , fk_c_typecontact : string , phone : string , phone_mobile : string , nom : string } >| int <- 1 , - 1 > Array with data : firstname , lastname , socid ( - 1 for internal users ), email , code , libelle , status
2020-04-16 00:42:57 +02:00
*/
2023-03-03 14:53:06 +01:00
public function getInfosTicketExternalContact ( $status = - 1 )
2020-04-16 00:42:57 +02:00
{
2023-03-03 14:53:06 +01:00
return $this -> listeContact ( - 1 , 'external' , 0 , '' , $status );
2020-04-16 00:42:57 +02:00
}
/**
* Return id des contacts clients des intervenants
*
2024-10-19 01:21:41 +02:00
* @ return null | int [] Liste des id contacts intervenants
2020-04-16 00:42:57 +02:00
*/
public function getIdTicketInternalInvolvedContact ()
{
return $this -> getIdContact ( 'internal' , 'CONTRIBUTOR' );
}
/**
* Return id des contacts clients des intervenants
*
2024-10-19 01:21:41 +02:00
* @ return null | int [] Liste des id contacts intervenants
2020-04-16 00:42:57 +02:00
*/
public function getIdTicketCustomerInvolvedContact ()
{
return $this -> getIdContact ( 'external' , 'CONTRIBUTOR' );
}
/**
* Return id of all contacts for ticket
*
2024-10-19 01:21:41 +02:00
* @ return int [] Array of contacts for tickets
2020-04-16 00:42:57 +02:00
*/
public function getTicketAllContacts ()
{
2022-08-11 01:09:56 +02:00
$array_contact = $this -> getIdTicketInternalContact ();
2020-04-16 00:42:57 +02:00
2022-08-11 01:09:56 +02:00
$array_contact = array_merge ( $array_contact , $this -> getIdTicketCustomerContact ());
2020-04-16 00:42:57 +02:00
2022-08-11 01:09:56 +02:00
$array_contact = array_merge ( $array_contact , $this -> getIdTicketInternalInvolvedContact ());
$array_contact = array_merge ( $array_contact , $this -> getIdTicketCustomerInvolvedContact ());
2020-04-16 00:42:57 +02:00
return $array_contact ;
}
/**
* Return id of all contacts for ticket
*
2024-10-19 01:21:41 +02:00
* @ return int [] Array of contacts
2020-04-16 00:42:57 +02:00
*/
public function getTicketAllCustomerContacts ()
{
$array_contact = array ();
2022-08-11 01:09:56 +02:00
$array_contact = array_merge ( $array_contact , $this -> getIdTicketCustomerContact ());
$array_contact = array_merge ( $array_contact , $this -> getIdTicketCustomerInvolvedContact ());
2020-04-16 00:42:57 +02:00
return $array_contact ;
}
/**
* Get array of all contacts for a ticket
* Override method of file commonobject . class . php to add phone number
*
2023-03-03 14:53:06 +01:00
* @ param int $statusoflink Status of lines to get ( - 1 = all )
* @ 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 string $code Filter on this code of contact type ( 'SHIPPING' , 'BILLING' , ... )
* @ param int $status Status of user or company
2024-03-19 02:32:32 +01:00
* @ return array < int | array { source : string , id : int , rowid : int , email : string , civility : string , firstname : string , lastname : string , labeltype : string , libelle : string , socid : int , code : string , status : int , statuscontact : string , fk_c_typecontact : string , phone : string , phone_mobile : string , nom : string } >| int <- 1 , - 1 > Array of array ( 'email' =>... , 'lastname' =>... )
2023-03-03 14:53:06 +01:00
*/
public function listeContact ( $statusoflink = - 1 , $source = 'external' , $list = 0 , $code = '' , $status = - 1 )
2020-04-16 00:42:57 +02:00
{
global $langs ;
$tab = array ();
$sql = " SELECT ec.rowid, ec.statut as statuslink, ec.fk_socpeople as id, ec.fk_c_type_contact " ; // This field contains id of llx_socpeople or id of llx_user
if ( $source == 'internal' ) {
$sql .= " , '-1' as socid, t.statut as statuscontact " ;
}
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
if ( $source == 'external' || $source == 'thirdparty' ) {
$sql .= " , t.fk_soc as socid, t.statut as statuscontact " ;
}
2019-02-25 20:35:59 +01:00
2020-04-16 00:42:57 +02:00
$sql .= " , t.civility, t.lastname as lastname, t.firstname, t.email " ;
if ( $source == 'internal' ) {
$sql .= " , t.office_phone as phone, t.user_mobile as phone_mobile " ;
}
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
if ( $source == 'external' ) {
$sql .= " , t.phone as phone, t.phone_mobile as phone_mobile, t.phone_perso as phone_perso " ;
}
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
$sql .= " , tc.source, tc.element, tc.code, tc.libelle as type_contact_label " ;
$sql .= " FROM " . MAIN_DB_PREFIX . " c_type_contact tc " ;
$sql .= " , " . MAIN_DB_PREFIX . " element_contact ec " ;
if ( $source == 'internal' ) {
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " user t on ec.fk_socpeople = t.rowid " ;
}
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
if ( $source == 'external' || $source == 'thirdparty' ) {
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " socpeople t on ec.fk_socpeople = t.rowid " ;
}
2018-03-10 04:23:59 +01:00
2021-08-27 18:18:50 +02:00
$sql .= " WHERE ec.element_id = " . (( int ) $this -> id );
2020-04-16 00:42:57 +02:00
$sql .= " AND ec.fk_c_type_contact=tc.rowid " ;
$sql .= " AND tc.element=' " . $this -> db -> escape ( $this -> element ) . " ' " ;
if ( $source == 'internal' ) {
$sql .= " AND tc.source = 'internal' " ;
2023-03-03 14:53:06 +01:00
if ( $status >= 0 ) {
$sql .= " AND t.statut = " . (( int ) $status );
}
2020-04-16 00:42:57 +02:00
}
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
if ( $source == 'external' || $source == 'thirdparty' ) {
$sql .= " AND tc.source = 'external' " ;
2023-03-03 14:53:06 +01:00
if ( $status >= 0 ) {
$sql .= " AND t.statut = " . (( int ) $status );
}
2020-04-16 00:42:57 +02:00
}
2018-03-10 04:23:59 +01:00
2022-06-07 14:31:22 +02:00
if ( ! empty ( $code )) {
$sql .= " AND tc.code = ' " . $this -> db -> escape ( $code ) . " ' " ;
}
2020-04-16 00:42:57 +02:00
$sql .= " AND tc.active=1 " ;
2023-03-03 14:53:06 +01:00
if ( $statusoflink >= 0 ) {
$sql .= " AND ec.statut = " . (( int ) $statusoflink );
2020-04-16 00:42:57 +02:00
}
2019-01-21 16:42:34 +01:00
2020-04-16 00:42:57 +02:00
$sql .= " ORDER BY t.lastname ASC " ;
$resql = $this -> db -> query ( $sql );
if ( $resql ) {
$num = $this -> db -> num_rows ( $resql );
$i = 0 ;
while ( $i < $num ) {
$obj = $this -> db -> fetch_object ( $resql );
if ( ! $list ) {
$transkey = " TypeContact_ " . $obj -> element . " _ " . $obj -> source . " _ " . $obj -> code ;
2024-02-29 14:42:15 +01:00
$labelType = ( $langs -> trans ( $transkey ) != $transkey ? $langs -> trans ( $transkey ) : $obj -> type_contact_label );
2020-04-16 00:42:57 +02:00
$tab [ $i ] = array (
2024-04-27 12:43:04 +02:00
'source' => $obj -> source ,
'socid' => $obj -> socid ,
'id' => $obj -> id ,
'nom' => $obj -> lastname , // For backward compatibility
'civility' => $obj -> civility ,
'lastname' => $obj -> lastname ,
'firstname' => $obj -> firstname ,
'email' => $obj -> email ,
'rowid' => $obj -> rowid ,
'code' => $obj -> code ,
'libelle' => $labelType , // deprecated, replaced with labeltype
'labeltype' => $labelType ,
'status' => $obj -> statuslink ,
'statuscontact' => $obj -> statuscontact ,
'fk_c_type_contact' => $obj -> fk_c_type_contact ,
'phone' => $obj -> phone ,
'phone_mobile' => $obj -> phone_mobile );
2020-04-16 00:42:57 +02:00
} else {
$tab [ $i ] = $obj -> id ;
}
$i ++ ;
}
return $tab ;
} else {
$this -> error = $this -> db -> error ();
dol_print_error ( $this -> db );
return - 1 ;
}
}
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
/**
* Get a default reference .
*
* @ param Societe $thirdparty Thirdparty
* @ return string Reference
*/
2024-01-12 17:07:22 +01:00
public function getDefaultRef ( $thirdparty = null )
2020-04-16 00:42:57 +02:00
{
global $conf ;
$defaultref = '' ;
2024-02-28 08:00:12 +01:00
$modele = getDolGlobalString ( 'TICKET_ADDON' , 'mod_ticket_simple' );
2020-04-16 00:42:57 +02:00
// Search template files
$file = '' ;
$classname = '' ;
2024-10-19 01:21:41 +02:00
$reldir = '' ;
2020-04-16 00:42:57 +02:00
$dirmodels = array_merge ( array ( '/' ), ( array ) $conf -> modules_parts [ 'models' ]);
foreach ( $dirmodels as $reldir ) {
$file = dol_buildpath ( $reldir . " core/modules/ticket/ " . $modele . '.php' , 0 );
if ( file_exists ( $file )) {
$classname = $modele ;
break ;
}
2019-09-12 18:39:29 +02:00
}
2018-03-10 04:23:59 +01:00
2024-03-20 04:26:16 +01:00
if ( $classname !== '' ) {
2020-04-16 00:42:57 +02:00
$result = dol_include_once ( $reldir . " core/modules/ticket/ " . $modele . '.php' );
2023-12-04 13:53:48 +01:00
$modTicket = new $classname ();
2024-08-17 19:32:52 +02:00
'@phan-var-force ModeleNumRefTicket $modTicket' ;
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
$defaultref = $modTicket -> getNextValue ( $thirdparty , $this );
}
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
if ( is_numeric ( $defaultref ) && $defaultref <= 0 ) {
$defaultref = '' ;
}
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
return $defaultref ;
}
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return if at least one photo is available
*
* @ param string $sdir Directory to scan
* @ return boolean True if at least one photo is available , False if not
*/
public function is_photo_available ( $sdir )
{
// phpcs:enable
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php' ;
$dir = $sdir . '/' ;
$dir_osencoded = dol_osencode ( $dir );
if ( file_exists ( $dir_osencoded )) {
$handle = opendir ( $dir_osencoded );
if ( is_resource ( $handle )) {
while (( $file = readdir ( $handle )) !== false ) {
if ( ! utf8_check ( $file )) {
2023-12-07 03:37:05 +01:00
$file = mb_convert_encoding ( $file , 'UTF-8' , 'ISO-8859-1' ); // To be sure data is stored in UTF8 in memory
2020-04-16 00:42:57 +02:00
}
if ( dol_is_file ( $dir . $file )) {
return true ;
}
}
}
}
return false ;
}
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
/**
* Copy files defined into $_SESSION array into the ticket directory of attached files .
* Used for files linked into messages .
* Files may be renamed during copy to avoid overwriting existing files .
*
2023-05-13 16:39:42 +02:00
* @ param string $forcetrackid Force trackid used for $keytoavoidconflict into get_attached_files ()
2024-10-19 01:21:41 +02:00
* @ return array { listofpaths : string [], listofnames : string [], listofmimes : string []} | int <- 1 , - 1 > Array with final path / name / mime of files .
2020-04-16 00:42:57 +02:00
*/
2023-02-22 14:29:36 +01:00
public function copyFilesForTicket ( $forcetrackid = null )
2020-04-16 00:42:57 +02:00
{
global $conf ;
2018-03-11 11:54:30 +01:00
2020-04-16 00:42:57 +02:00
// Create form object
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php' ;
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php' ;
include_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php' ;
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
$maxwidthsmall = 270 ;
$maxheightsmall = 150 ;
$maxwidthmini = 128 ;
$maxheightmini = 72 ;
2018-03-10 04:23:59 +01:00
2020-04-16 00:42:57 +02:00
$formmail = new FormMail ( $this -> db );
2023-02-22 14:29:36 +01:00
$formmail -> trackid = ( is_null ( $forcetrackid ) ? 'tic' . $this -> id : '' );
2020-04-16 00:42:57 +02:00
$attachedfiles = $formmail -> get_attached_files ();
2023-05-13 16:39:42 +02:00
$filepath = $attachedfiles [ 'paths' ]; // path is for example user->dir_temp.'/'.$user->id.'/'...
2020-04-16 00:42:57 +02:00
$filename = $attachedfiles [ 'names' ];
$mimetype = $attachedfiles [ 'mimes' ];
2019-10-04 19:41:35 +02:00
2020-04-16 00:42:57 +02:00
// Copy files into ticket directory
$destdir = $conf -> ticket -> dir_output . '/' . $this -> ref ;
if ( ! dol_is_dir ( $destdir )) {
dol_mkdir ( $destdir );
}
2019-10-04 19:41:35 +02:00
2020-04-16 00:42:57 +02:00
$listofpaths = array ();
$listofnames = array ();
foreach ( $filename as $i => $val ) {
$destfile = $destdir . '/' . $filename [ $i ];
// If destination file already exists, we add a suffix to avoid to overwrite
2021-02-26 13:27:00 +01:00
if ( is_file ( $destfile )) {
2020-06-10 17:01:57 +02:00
$pathinfo = pathinfo ( $filename [ $i ]);
2020-04-16 00:42:57 +02:00
$now = dol_now ();
2020-06-10 17:01:57 +02:00
$destfile = $destdir . '/' . $pathinfo [ 'filename' ] . ' - ' . dol_print_date ( $now , 'dayhourlog' ) . '.' . $pathinfo [ 'extension' ];
2020-04-16 00:42:57 +02:00
}
2024-03-11 12:55:55 +01:00
$moreinfo = array ( 'description' => 'File saved by copyFilesForTicket' , 'src_object_type' => $this -> element , 'src_object_id' => $this -> id );
2024-10-03 15:04:32 +02:00
2024-09-13 03:11:43 +02:00
$res = dol_move ( $filepath [ $i ], $destfile , '0' , 1 , 0 , 1 , $moreinfo );
2024-10-03 15:04:32 +02:00
2023-05-13 14:36:08 +02:00
if ( ! $res ) {
// Move has failed
$this -> error = " Failed to move file " . dirbasename ( $filepath [ $i ]) . " into " . dirbasename ( $destfile );
return - 1 ;
2023-05-13 16:39:42 +02:00
} else {
// If file is an image, we create thumbs
if ( image_format_supported ( $destfile ) == 1 ) {
// Create small thumbs for image (Ratio is near 16/9)
// Used on logon for example
$imgThumbSmall = vignette ( $destfile , $maxwidthsmall , $maxheightsmall , '_small' , 50 , " thumbs " );
// Create mini thumbs for image (Ratio is near 16/9)
// Used on menu or for setup page for example
$imgThumbMini = vignette ( $destfile , $maxwidthmini , $maxheightmini , '_mini' , 50 , " thumbs " );
}
2020-04-16 00:42:57 +02:00
}
2023-05-13 16:39:42 +02:00
// Clear variables into session
2020-04-16 00:42:57 +02:00
$formmail -> remove_attached_files ( $i );
// Fill array with new names
$listofpaths [ $i ] = $destfile ;
$listofnames [ $i ] = basename ( $destfile );
}
2019-10-04 19:41:35 +02:00
2024-03-11 12:55:55 +01:00
return array ( 'listofpaths' => $listofpaths , 'listofnames' => $listofnames , 'listofmimes' => $mimetype );
2020-04-16 00:42:57 +02:00
}
2019-04-10 11:39:54 +02:00
2021-07-02 10:26:03 +02:00
/**
* Sets object to supplied categories .
*
* Deletes object from existing categories not supplied .
* Adds it to non existing supplied categories .
* Existing categories are left untouch .
*
2022-12-31 14:01:03 +01:00
* @ param int [] | int $categories Category or categories IDs
2023-12-01 19:51:32 +01:00
* @ return int Return integer < 0 if KO , > 0 if OK
2021-07-02 10:26:03 +02:00
*/
public function setCategories ( $categories )
{
// Handle single category
if ( ! is_array ( $categories )) {
$categories = array ( $categories );
}
// Get current categories
include_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php' ;
$c = new Categorie ( $this -> db );
$existing = $c -> containing ( $this -> id , Categorie :: TYPE_TICKET , 'id' );
// Diff
if ( is_array ( $existing )) {
$to_del = array_diff ( $existing , $categories );
$to_add = array_diff ( $categories , $existing );
} else {
$to_del = array (); // Nothing to delete
$to_add = $categories ;
}
// Process
foreach ( $to_del as $del ) {
if ( $c -> fetch ( $del ) > 0 ) {
$c -> del_type ( $this , Categorie :: TYPE_TICKET );
}
}
foreach ( $to_add as $add ) {
if ( $c -> fetch ( $add ) > 0 ) {
$c -> add_type ( $this , Categorie :: TYPE_TICKET );
}
}
2023-01-04 11:36:46 +01:00
return 1 ;
2021-07-02 10:26:03 +02:00
}
2019-04-10 11:39:54 +02:00
2020-04-16 00:42:57 +02:00
/**
2022-09-30 12:31:29 +02:00
* Add new message on a ticket ( private / public area ) .
2023-01-04 18:11:40 +01:00
* Can also send it by email if GETPOST ( 'send_email' , 'int' ) is set . For such email , header and footer is added .
2020-04-16 00:42:57 +02:00
*
2023-05-13 14:36:08 +02:00
* @ param User $user User for action
* @ param string $action Action string
2023-11-09 10:56:13 +01:00
* @ param int $private 1 = Message is private ( must not be visible by external users )
* @ param int $public_area 0 = Default ,
* 1 = If we are creating the message from a public area , so confirmation email will be sent to the author
* and we can search contact from email to add it as contact of ticket if TICKET_ASSIGN_CONTACT_TO_MESSAGE is set
2023-12-06 15:46:39 +01:00
* @ return int Return integer < 0 if KO , >= 0 if OK
2020-04-16 00:42:57 +02:00
*/
2020-05-27 11:39:06 +02:00
public function newMessage ( $user , & $action , $private = 1 , $public_area = 0 )
2020-04-16 00:42:57 +02:00
{
2024-08-31 19:43:58 +02:00
global $mysoc , $langs ;
2019-04-10 11:39:54 +02:00
2020-04-16 00:42:57 +02:00
$error = 0 ;
2019-04-10 11:39:54 +02:00
2020-04-16 00:42:57 +02:00
$object = new Ticket ( $this -> db );
2019-04-10 11:39:54 +02:00
2024-10-19 01:21:41 +02:00
$ret = $object -> fetch ( 0 , '' , GETPOST ( 'track_id' , 'alpha' ));
2019-05-01 20:41:03 +02:00
2020-04-16 00:42:57 +02:00
$object -> socid = $object -> fk_soc ;
$object -> fetch_thirdparty ();
2024-10-26 22:43:44 +02:00
$object -> fetchProject ();
2019-10-04 19:41:35 +02:00
2020-04-16 00:42:57 +02:00
if ( $ret < 0 ) {
$error ++ ;
array_push ( $this -> errors , $langs -> trans ( " ErrorTicketIsNotValid " ));
$action = '' ;
}
2019-04-10 11:39:54 +02:00
2020-04-16 00:42:57 +02:00
if ( ! GETPOST ( " message " )) {
$error ++ ;
2024-04-04 15:15:04 +02:00
array_push ( $this -> errors , $langs -> trans ( " ErrorFieldRequired " , $langs -> transnoentities ( " Message " )));
2020-04-16 00:42:57 +02:00
$action = 'add_message' ;
}
2019-04-10 11:39:54 +02:00
2020-04-16 00:42:57 +02:00
if ( ! $error ) {
$object -> subject = GETPOST ( 'subject' , 'alphanohtml' );
2020-09-18 01:29:17 +02:00
$object -> message = GETPOST ( " message " , " restricthtml " );
2020-04-16 00:42:57 +02:00
$object -> private = GETPOST ( " private_message " , " alpha " );
2019-10-04 19:41:35 +02:00
Fix: GETPOST(...,'int') to GETPOSTINT(...) (#28448)
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: Update spelling exceptions
* Qual: Ignore Phan Notice
2024-02-27 14:05:53 +01:00
$send_email = GETPOSTINT ( 'send_email' );
2019-04-10 11:39:54 +02:00
2020-04-16 00:42:57 +02:00
// Copy attached files (saved into $_SESSION) as linked files to ticket. Return array with final name used.
$resarray = $object -> copyFilesForTicket ();
2023-05-13 14:36:08 +02:00
if ( is_numeric ( $resarray ) && $resarray == - 1 ) {
setEventMessages ( $object -> error , $object -> errors , 'errors' );
return - 1 ;
}
2019-10-04 19:41:35 +02:00
2020-04-16 00:42:57 +02:00
$listofpaths = $resarray [ 'listofpaths' ];
$listofnames = $resarray [ 'listofnames' ];
$listofmimes = $resarray [ 'listofmimes' ];
2019-10-04 19:41:35 +02:00
2023-10-11 03:36:15 +02:00
$id = $object -> createTicketMessage ( $user , 0 , $listofpaths , $listofmimes , $listofnames , $send_email , $public_area );
2020-04-16 00:42:57 +02:00
if ( $id <= 0 ) {
$error ++ ;
2020-05-27 23:32:24 +02:00
$this -> error = $object -> error ;
2020-04-16 00:42:57 +02:00
$this -> errors = $object -> errors ;
$action = 'add_message' ;
}
2019-04-10 11:39:54 +02:00
2020-04-16 00:42:57 +02:00
if ( ! $error && $id > 0 ) {
setEventMessages ( $langs -> trans ( 'TicketMessageSuccessfullyAdded' ), null , 'mesgs' );
2019-04-10 11:39:54 +02:00
2020-05-27 11:39:06 +02:00
if ( ! empty ( $public_area )) {
/*
2022-11-13 00:22:24 +01:00
* Message created from the Public interface
2022-09-30 12:31:29 +02:00
*
2020-05-27 11:39:06 +02:00
* Send emails to assigned users ( public area notification )
*/
2023-11-27 12:08:48 +01:00
if ( getDolGlobalString ( 'TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_ENABLED' )) {
2023-01-04 18:11:40 +01:00
// Retrieve internal contact datas
2023-03-03 14:53:06 +01:00
$internal_contacts = $object -> getInfosTicketInternalContact ( 1 );
2023-01-04 18:11:40 +01:00
2020-05-27 11:39:06 +02:00
$assigned_user_dont_have_email = '' ;
2023-01-04 18:11:40 +01:00
2020-05-27 11:39:06 +02:00
$sendto = array ();
2023-01-04 18:11:40 +01:00
2020-05-27 11:39:06 +02:00
if ( $this -> fk_user_assign > 0 ) {
$assigned_user = new User ( $this -> db );
$assigned_user -> fetch ( $this -> fk_user_assign );
if ( ! empty ( $assigned_user -> email )) {
2023-02-09 11:52:41 +01:00
$sendto [ $assigned_user -> email ] = $assigned_user -> getFullName ( $langs ) . " < " . $assigned_user -> email . " > " ;
2020-05-27 11:39:06 +02:00
} else {
$assigned_user_dont_have_email = $assigned_user -> getFullName ( $langs );
2020-04-16 00:42:57 +02:00
}
2024-10-19 01:21:41 +02:00
} else {
$assigned_user = null ;
2020-05-27 11:39:06 +02:00
}
2023-01-04 18:11:40 +01:00
// Build array to display recipient list
foreach ( $internal_contacts as $key => $info_sendto ) {
// Avoid duplicate notifications
if ( $info_sendto [ 'id' ] == $user -> id ) {
continue ;
}
2024-04-04 11:44:22 +02:00
// We check if the email address is not the assignee's address to prevent notification from being sent twice
2024-10-19 01:21:41 +02:00
if ( ! empty ( $info_sendto [ 'email' ]) && ( $assigned_user === null || $assigned_user -> email != $info_sendto [ 'email' ])) {
2024-04-04 11:44:22 +02:00
$sendto [] = dolGetFirstLastname ( $info_sendto [ 'firstname' ], $info_sendto [ 'lastname' ]) . " < " . $info_sendto [ 'email' ] . " > " ;
2022-12-20 11:43:42 +01:00
}
}
2023-01-04 18:11:40 +01:00
2020-05-27 11:39:06 +02:00
if ( empty ( $sendto )) {
2023-11-27 12:08:48 +01:00
if ( getDolGlobalString ( 'TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL' )) {
2024-01-05 04:18:53 +01:00
$sendto [ getDolGlobalString ( 'TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL' )] = getDolGlobalString ( 'TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL' );
2023-11-27 12:08:48 +01:00
} elseif ( getDolGlobalString ( 'TICKET_NOTIFICATION_EMAIL_TO' )) {
2024-01-05 04:18:53 +01:00
$sendto [ getDolGlobalString ( 'TICKET_NOTIFICATION_EMAIL_TO' )] = getDolGlobalString ( 'TICKET_NOTIFICATION_EMAIL_TO' );
2020-04-16 00:42:57 +02:00
}
}
// Add global email address recipient
2024-11-21 10:10:32 +01:00
if ( getDolGlobalString ( 'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS' ) && ! array_key_exists ( getDolGlobalString ( 'TICKET_NOTIFICATION_EMAIL_TO' ), $sendto )) {
if ( getDolGlobalString ( 'TICKET_NOTIFICATION_EMAIL_TO' )) {
$sendto [ getDolGlobalString ( 'TICKET_NOTIFICATION_EMAIL_TO' )] = getDolGlobalString ( 'TICKET_NOTIFICATION_EMAIL_TO' );
}
2020-04-16 00:42:57 +02:00
}
if ( ! empty ( $sendto )) {
2023-09-29 16:27:07 +02:00
$appli = getDolGlobalString ( 'MAIN_APPLICATION_TITLE' , $mysoc -> name );
2023-12-18 09:45:09 +01:00
$subject = '[' . $appli . '- ticket #' . $object -> track_id . '] ' . $this -> subject ;
2020-05-27 11:39:06 +02:00
// Message send
2024-07-01 01:51:33 +02:00
$message = getDolGlobalString ( 'TICKET_MESSAGE_MAIL_INTRO' , $langs -> trans ( 'TicketMessageMailIntroText' ));
2020-08-28 17:54:57 +02:00
$message .= '<br><br>' ;
2020-09-03 17:22:27 +02:00
$messagePost = GETPOST ( 'message' , 'restricthtml' );
if ( ! dol_textishtml ( $messagePost )) {
$messagePost = dol_nl2br ( $messagePost );
}
$message .= $messagePost ;
2020-05-27 11:39:06 +02:00
// Customer company infos
2020-08-28 17:54:57 +02:00
$message .= '<br><br>' ;
2020-05-27 11:39:06 +02:00
$message .= " ============================================== " ;
2020-09-08 21:27:28 +02:00
$message .= ! empty ( $object -> thirdparty -> name ) ? '<br>' . $langs -> trans ( 'Thirdparty' ) . " : " . $object -> thirdparty -> name : '' ;
$message .= ! empty ( $object -> thirdparty -> town ) ? '<br>' . $langs -> trans ( 'Town' ) . " : " . $object -> thirdparty -> town : '' ;
$message .= ! empty ( $object -> thirdparty -> phone ) ? '<br>' . $langs -> trans ( 'Phone' ) . " : " . $object -> thirdparty -> phone : '' ;
2020-05-27 11:39:06 +02:00
// Email send to
2020-08-28 17:54:57 +02:00
$message .= '<br><br>' ;
2020-05-27 11:39:06 +02:00
if ( ! empty ( $assigned_user_dont_have_email )) {
2020-09-08 21:27:28 +02:00
$message .= '<br>' . $langs -> trans ( 'NoEMail' ) . ' : ' . $assigned_user_dont_have_email ;
2020-05-27 11:39:06 +02:00
}
foreach ( $sendto as $val ) {
2020-09-08 21:27:28 +02:00
$message .= '<br>' . $langs -> trans ( 'TicketNotificationRecipient' ) . ' : ' . $val ;
2020-05-27 11:39:06 +02:00
}
// URL ticket
2020-09-08 21:27:28 +02:00
$url_internal_ticket = dol_buildpath ( '/ticket/card.php' , 2 ) . '?track_id=' . $object -> track_id ;
2020-08-28 17:54:57 +02:00
$message .= '<br><br>' ;
2020-09-08 21:27:28 +02:00
$message .= $langs -> trans ( 'TicketNotificationEmailBodyInfosTrackUrlinternal' ) . ' : <a href="' . $url_internal_ticket . '">' . $object -> track_id . '</a>' ;
2020-05-27 11:39:06 +02:00
2024-10-19 01:21:41 +02:00
$this -> sendTicketMessageByEmail ( $subject , $message , 0 , $sendto , $listofpaths , $listofmimes , $listofnames );
2020-04-16 00:42:57 +02:00
}
}
2021-02-26 13:27:00 +01:00
} else {
/*
2022-11-13 00:22:24 +01:00
* Message send from the Backoffice / Private area
2022-09-30 12:31:29 +02:00
*
2022-11-13 00:22:24 +01:00
* Send emails to internal users ( linked contacts ) then , if private is not set , to external users ( linked contacts or thirdparty email if no contact set )
2020-05-27 11:39:06 +02:00
*/
if ( $send_email > 0 ) {
// Retrieve internal contact datas
2023-03-03 14:53:06 +01:00
$internal_contacts = $object -> getInfosTicketInternalContact ( 1 );
2020-04-16 00:42:57 +02:00
$sendto = array ();
2020-05-27 11:39:06 +02:00
if ( is_array ( $internal_contacts ) && count ( $internal_contacts ) > 0 ) {
2022-11-13 00:22:24 +01:00
// Set default subject
2023-09-29 16:27:07 +02:00
$appli = getDolGlobalString ( 'MAIN_APPLICATION_TITLE' , $mysoc -> name );
2022-11-13 00:22:24 +01:00
$subject = GETPOST ( 'subject' , 'alphanohtml' ) ? GETPOST ( 'subject' , 'alphanohtml' ) : '[' . $appli . ' - ' . $langs -> trans ( " Ticket " ) . ' #' . $object -> track_id . '] ' . $langs -> trans ( 'TicketNewMessage' );
2020-04-16 00:42:57 +02:00
2020-09-07 10:18:17 +02:00
$message_intro = $langs -> trans ( 'TicketNotificationEmailBody' , " # " . $object -> id );
2022-09-30 12:31:29 +02:00
$message_signature = GETPOST ( 'mail_signature' ) ? GETPOST ( 'mail_signature' ) : getDolGlobalString ( 'TICKET_MESSAGE_MAIL_SIGNATURE' );
2020-04-16 00:42:57 +02:00
2024-07-01 01:51:33 +02:00
$message = getDolGlobalString ( 'TICKET_MESSAGE_MAIL_INTRO' , $langs -> trans ( 'TicketMessageMailIntroText' ));
2020-08-28 17:54:57 +02:00
$message .= '<br><br>' ;
2020-09-03 17:22:27 +02:00
$messagePost = GETPOST ( 'message' , 'restricthtml' );
if ( ! dol_textishtml ( $messagePost )) {
$messagePost = dol_nl2br ( $messagePost );
}
$message .= $messagePost ;
2020-04-16 00:42:57 +02:00
2022-11-13 00:22:24 +01:00
// Data about customer
2020-08-28 17:54:57 +02:00
$message .= '<br><br>' ;
$message .= " ==============================================<br> " ;
2020-09-08 21:27:28 +02:00
$message .= ! empty ( $object -> thirdparty -> name ) ? $langs -> trans ( 'Thirdparty' ) . " : " . $object -> thirdparty -> name : '' ;
$message .= ! empty ( $object -> thirdparty -> town ) ? '<br>' . $langs -> trans ( 'Town' ) . " : " . $object -> thirdparty -> town : '' ;
$message .= ! empty ( $object -> thirdparty -> phone ) ? '<br>' . $langs -> trans ( 'Phone' ) . " : " . $object -> thirdparty -> phone : '' ;
2020-05-27 11:39:06 +02:00
// Build array to display recipient list
foreach ( $internal_contacts as $key => $info_sendto ) {
2022-11-13 00:22:24 +01:00
// Avoid duplicate notifications
2020-05-27 11:39:06 +02:00
if ( $info_sendto [ 'id' ] == $user -> id ) {
2020-04-16 00:42:57 +02:00
continue ;
}
2020-05-27 11:39:06 +02:00
if ( $info_sendto [ 'email' ] != '' ) {
2024-08-31 19:43:58 +02:00
$email = $info_sendto [ 'email' ];
if ( $email != null ) {
$sendto [ $email ] = dolGetFirstLastname ( $info_sendto [ 'firstname' ], $info_sendto [ 'lastname' ]) . " < " . $info_sendto [ 'email' ] . " > " ;
2021-02-26 13:27:00 +01:00
}
2020-04-16 00:42:57 +02:00
2022-11-13 00:22:24 +01:00
// Contact type
2024-08-31 19:43:58 +02:00
$recipient = dolGetFirstLastname ( $info_sendto [ 'firstname' ], $info_sendto [ 'lastname' ], - 1 ) . ' (' . strtolower (( string ) $info_sendto [ 'libelle' ]) . ')' ;
2020-09-08 21:27:28 +02:00
$message .= ( ! empty ( $recipient ) ? $langs -> trans ( 'TicketNotificationRecipient' ) . ' : ' . $recipient . '<br>' : '' );
2020-04-16 00:42:57 +02:00
}
}
2020-08-28 17:54:57 +02:00
$message .= '<br>' ;
2020-05-27 11:39:06 +02:00
// URL ticket
2020-09-08 21:27:28 +02:00
$url_internal_ticket = dol_buildpath ( '/ticket/card.php' , 2 ) . '?track_id=' . $object -> track_id ;
2020-04-16 00:42:57 +02:00
2022-11-13 00:22:24 +01:00
// Add html link on url
2020-09-08 21:27:28 +02:00
$message .= '<br>' . $langs -> trans ( 'TicketNotificationEmailBodyInfosTrackUrlinternal' ) . ' : <a href="' . $url_internal_ticket . '">' . $object -> track_id . '</a><br>' ;
2020-04-16 00:42:57 +02:00
2020-05-27 11:39:06 +02:00
// Add global email address recipient
2024-02-27 00:09:35 +01:00
if ( getDolGlobalString ( 'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS' ) && ! array_key_exists ( getDolGlobalString ( 'TICKET_NOTIFICATION_EMAIL_TO' ), $sendto )) {
2024-03-16 15:51:21 +01:00
if ( getDolGlobalString ( 'TICKET_NOTIFICATION_EMAIL_TO' )) {
2023-11-17 11:39:16 +01:00
$sendto [ getDolGlobalString ( 'TICKET_NOTIFICATION_EMAIL_TO' )] = getDolGlobalString ( 'TICKET_NOTIFICATION_EMAIL_TO' );
2021-02-26 13:27:00 +01:00
}
2020-04-16 00:42:57 +02:00
}
2024-01-12 17:18:52 +01:00
// don't try to send email if no recipient
2020-04-16 00:42:57 +02:00
if ( ! empty ( $sendto )) {
2024-10-19 01:21:41 +02:00
$this -> sendTicketMessageByEmail ( $subject , $message , 0 , $sendto , $listofpaths , $listofmimes , $listofnames );
2020-04-16 00:42:57 +02:00
}
}
2020-05-27 11:39:06 +02:00
/*
* Send emails for externals users if not private ( linked contacts )
*/
if ( empty ( $object -> private )) {
// Retrieve email of all contacts (external)
2023-03-03 14:53:06 +01:00
$external_contacts = $object -> getInfosTicketExternalContact ( 1 );
2020-05-27 11:39:06 +02:00
// If no contact, get email from thirdparty
if ( is_array ( $external_contacts ) && count ( $external_contacts ) === 0 ) {
if ( ! empty ( $object -> fk_soc )) {
$object -> fetch_thirdparty ( $object -> fk_soc );
$array_company = array ( array ( 'firstname' => '' , 'lastname' => $object -> thirdparty -> name , 'email' => $object -> thirdparty -> email , 'libelle' => $langs -> transnoentities ( 'Customer' ), 'socid' => $object -> thirdparty -> id ));
$external_contacts = array_merge ( $external_contacts , $array_company );
2024-02-08 13:58:40 +01:00
} elseif ( empty ( $object -> fk_soc ) && ! empty ( $object -> origin_replyto )) {
$array_external = array ( array ( 'firstname' => '' , 'lastname' => $object -> origin_replyto , 'email' => $object -> origin_replyto , 'libelle' => $langs -> transnoentities ( 'Customer' ), 'socid' => 0 ));
$external_contacts = array_merge ( $external_contacts , $array_external );
2020-05-27 11:39:06 +02:00
} elseif ( empty ( $object -> fk_soc ) && ! empty ( $object -> origin_email )) {
$array_external = array ( array ( 'firstname' => '' , 'lastname' => $object -> origin_email , 'email' => $object -> thirdparty -> email , 'libelle' => $langs -> transnoentities ( 'Customer' ), 'socid' => $object -> thirdparty -> id ));
$external_contacts = array_merge ( $external_contacts , $array_external );
}
}
$sendto = array ();
if ( is_array ( $external_contacts ) && count ( $external_contacts ) > 0 ) {
2022-11-13 00:22:24 +01:00
// Get default subject for email to external contacts
2023-09-29 16:27:07 +02:00
$appli = getDolGlobalString ( 'MAIN_APPLICATION_TITLE' , $mysoc -> name );
2022-11-13 00:22:24 +01:00
$subject = GETPOST ( 'subject' ) ? GETPOST ( 'subject' ) : '[' . $appli . ' - ' . $langs -> trans ( " Ticket " ) . ' #' . $object -> track_id . '] ' . $langs -> trans ( 'TicketNewMessage' );
2020-05-27 11:39:06 +02:00
2022-09-30 12:31:29 +02:00
$message_intro = GETPOST ( 'mail_intro' ) ? GETPOST ( 'mail_intro' , 'restricthtml' ) : getDolGlobalString ( 'TICKET_MESSAGE_MAIL_INTRO' );
$message_signature = GETPOST ( 'mail_signature' ) ? GETPOST ( 'mail_signature' , 'restricthtml' ) : getDolGlobalString ( 'TICKET_MESSAGE_MAIL_SIGNATURE' );
2020-09-03 17:22:27 +02:00
if ( ! dol_textishtml ( $message_intro )) {
$message_intro = dol_nl2br ( $message_intro );
}
if ( ! dol_textishtml ( $message_signature )) {
$message_signature = dol_nl2br ( $message_signature );
}
2020-05-27 11:39:06 +02:00
// We put intro after
2020-09-03 17:22:27 +02:00
$messagePost = GETPOST ( 'message' , 'restricthtml' );
if ( ! dol_textishtml ( $messagePost )) {
$messagePost = dol_nl2br ( $messagePost );
}
$message = $messagePost ;
2020-08-28 17:54:57 +02:00
$message .= '<br><br>' ;
2020-05-27 11:39:06 +02:00
foreach ( $external_contacts as $key => $info_sendto ) {
2023-12-13 14:52:40 +01:00
// avoid duplicate emails to external contacts
2020-06-25 12:17:47 +02:00
if ( $info_sendto [ 'id' ] == $user -> contact_id ) {
2020-05-27 11:39:06 +02:00
continue ;
}
if ( $info_sendto [ 'email' ] != '' && $info_sendto [ 'email' ] != $object -> origin_email ) {
2024-08-31 19:43:58 +02:00
$email = $info_sendto [ 'email' ];
if ( $email != null ) {
$sendto [ $email ] = trim ( $info_sendto [ 'firstname' ] . " " . $info_sendto [ 'lastname' ]) . " < " . $info_sendto [ 'email' ] . " > " ;
2021-02-26 13:27:00 +01:00
}
2020-05-27 11:39:06 +02:00
2024-08-31 19:43:58 +02:00
$recipient = dolGetFirstLastname ( $info_sendto [ 'firstname' ], $info_sendto [ 'lastname' ], - 1 ) . ' (' . strtolower (( string ) $info_sendto [ 'libelle' ]) . ')' ;
2020-09-08 21:27:28 +02:00
$message .= ( ! empty ( $recipient ) ? $langs -> trans ( 'TicketNotificationRecipient' ) . ' : ' . $recipient . '<br>' : '' );
2020-05-27 11:39:06 +02:00
}
}
// If public interface is not enable, use link to internal page into mail
2023-11-17 11:39:16 +01:00
$url_public_ticket = ( getDolGlobalInt ( 'TICKET_ENABLE_PUBLIC_INTERFACE' ) ?
2024-07-27 22:25:13 +02:00
( getDolGlobalString ( 'TICKET_URL_PUBLIC_INTERFACE' ) !== '' ? getDolGlobalString ( 'TICKET_URL_PUBLIC_INTERFACE' ) . '/view.php' : dol_buildpath ( '/public/ticket/view.php' , 2 )) : dol_buildpath ( '/ticket/card.php' , 2 )) . '?track_id=' . urlencode ( $object -> track_id );
2024-03-20 02:25:58 +01:00
2020-09-08 21:27:28 +02:00
$message .= '<br>' . $langs -> trans ( 'TicketNewEmailBodyInfosTrackUrlCustomer' ) . ' : <a href="' . $url_public_ticket . '">' . $object -> track_id . '</a><br>' ;
2020-05-27 11:39:06 +02:00
// Build final message
2020-09-08 21:27:28 +02:00
$message = $message_intro . '<br><br>' . $message ;
2020-05-27 11:39:06 +02:00
// Add signature
2020-09-08 21:27:28 +02:00
$message .= '<br>' . $message_signature ;
2020-05-27 11:39:06 +02:00
2024-06-07 16:18:20 +02:00
if ( ! empty ( $object -> origin_replyto )) {
$sendto [ $object -> origin_replyto ] = $object -> origin_replyto ;
2024-06-08 15:04:18 +02:00
} elseif ( ! empty ( $object -> origin_email )) {
2023-02-09 11:52:41 +01:00
$sendto [ $object -> origin_email ] = $object -> origin_email ;
2020-05-27 11:39:06 +02:00
}
2024-06-07 16:18:20 +02:00
if ( $object -> fk_soc > 0 && ! array_key_exists ( $object -> origin_replyto , $sendto ) && ! array_key_exists ( $object -> origin_email , $sendto )) {
2020-05-27 11:39:06 +02:00
$object -> socid = $object -> fk_soc ;
$object -> fetch_thirdparty ();
2021-02-26 13:27:00 +01:00
if ( ! empty ( $object -> thirdparty -> email )) {
2023-02-09 11:52:41 +01:00
$sendto [ $object -> thirdparty -> email ] = $object -> thirdparty -> email ;
2021-02-26 13:27:00 +01:00
}
2020-05-27 11:39:06 +02:00
}
2022-11-13 00:22:24 +01:00
// Add global email address recipient
2024-02-27 00:09:35 +01:00
if ( getDolGlobalString ( 'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS' ) && ! array_key_exists ( getDolGlobalString ( 'TICKET_NOTIFICATION_EMAIL_TO' ), $sendto )) {
2024-03-16 15:51:21 +01:00
if ( getDolGlobalString ( 'TICKET_NOTIFICATION_EMAIL_TO' )) {
2023-11-17 11:39:16 +01:00
$sendto [ getDolGlobalString ( 'TICKET_NOTIFICATION_EMAIL_TO' )] = getDolGlobalString ( 'TICKET_NOTIFICATION_EMAIL_TO' );
2021-02-26 13:27:00 +01:00
}
2020-05-27 11:39:06 +02:00
}
2024-01-12 17:18:52 +01:00
// Don't try to send email when no recipient
2020-05-27 11:39:06 +02:00
if ( ! empty ( $sendto )) {
2024-10-19 01:21:41 +02:00
$result = $this -> sendTicketMessageByEmail ( $subject , $message , 0 , $sendto , $listofpaths , $listofmimes , $listofnames );
2022-02-07 17:38:32 +01:00
if ( $result ) {
2022-11-13 00:22:24 +01:00
// update last_msg_sent date (for last message sent to external users)
2022-09-29 08:56:34 +02:00
$this -> date_last_msg_sent = dol_now ();
2022-11-13 00:22:24 +01:00
$this -> update ( $user , 1 ); // disable trigger when updating date_last_msg_sent. sendTicketMessageByEmail already create an event in actioncomm table.
2022-02-07 17:38:32 +01:00
}
2020-05-27 11:39:06 +02:00
}
}
}
2020-04-16 00:42:57 +02:00
}
}
2023-11-09 10:56:13 +01:00
// Set status back to "In progress" if not set yet, but only if internal user and not a private message
2024-01-12 17:18:52 +01:00
// Or set status to "In progress" if the client has answered and if the ticket has started
2023-11-09 10:56:13 +01:00
// So we are sure to leave the STATUS_DRAFT, STATUS_NEED_INFO.
2024-08-07 00:42:53 +02:00
// Except if TICKET_SET_STATUS_ON_ANSWER has been defined
if (( getDolGlobalInt ( 'TICKET_SET_STATUS_ON_ANSWER' , - 1 ) < 0
&& ( $object -> status < self :: STATUS_IN_PROGRESS && ! $user -> socid && ! $private ))
|| ( $object -> status > self :: STATUS_IN_PROGRESS && $public_area )) {
2023-11-09 10:56:13 +01:00
$object -> setStatut ( $object :: STATUS_IN_PROGRESS );
2024-08-07 00:42:53 +02:00
} elseif ( getDolGlobalInt ( 'TICKET_SET_STATUS_ON_ANSWER' , - 1 ) >= 0 && empty ( $user -> socid ) && empty ( $private )) {
$object -> setStatut ( getDolGlobalInt ( 'TICKET_SET_STATUS_ON_ANSWER' ));
2020-04-16 00:42:57 +02:00
}
2024-08-07 00:42:53 +02:00
2020-04-16 00:42:57 +02:00
return 1 ;
} else {
setEventMessages ( $object -> error , $object -> errors , 'errors' );
return - 1 ;
}
} else {
setEventMessages ( $this -> error , $this -> errors , 'errors' );
return - 1 ;
}
}
2019-04-10 11:39:54 +02:00
2019-04-11 19:20:55 +02:00
2020-04-16 00:42:57 +02:00
/**
* Send ticket by email to linked contacts
*
2024-10-19 01:21:41 +02:00
* @ param string $subject Email subject
* @ param string $message Email message
* @ param int < 0 , 1 > $send_internal_cc Receive a copy on internal email ( getDolGlobalString ( 'TICKET_NOTIFICATION_EMAIL_FROM' )
* @ param array < string > $array_receiver Array of receiver . Example array ( 'name' => 'John Doe' , 'email' => 'john@doe.com' , etc ... )
* @ param string [] $filename_list List of files to attach ( full path of filename on file system )
* @ param string [] $mimetype_list List of MIME type of attached files
* @ param string [] $mimefilename_list List of attached file name in message
2022-02-07 17:38:32 +01:00
* @ return boolean True if mail sent to at least one receiver , false otherwise
2020-04-16 00:42:57 +02:00
*/
public function sendTicketMessageByEmail ( $subject , $message , $send_internal_cc = 0 , $array_receiver = array (), $filename_list = array (), $mimetype_list = array (), $mimefilename_list = array ())
{
2023-11-17 11:39:16 +01:00
global $conf , $langs , $user ;
2020-04-16 00:42:57 +02:00
2024-02-27 00:09:35 +01:00
if ( getDolGlobalString ( 'TICKET_DISABLE_ALL_MAILS' )) {
2020-04-16 00:42:57 +02:00
dol_syslog ( get_class ( $this ) . '::sendTicketMessageByEmail: Emails are disable into ticket setup by option TICKET_DISABLE_ALL_MAILS' , LOG_WARNING );
2022-02-07 17:38:32 +01:00
return false ;
2020-04-16 00:42:57 +02:00
}
$langs -> load ( " mails " );
include_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php' ;
//$contactstatic = new Contact($this->db);
// If no receiver defined, load all ticket linked contacts
if ( ! is_array ( $array_receiver ) || ! count ( $array_receiver ) > 0 ) {
2023-03-03 14:53:06 +01:00
$array_receiver = $this -> getInfosTicketInternalContact ( 1 );
$array_receiver = array_merge ( $array_receiver , $this -> getInfosTicketExternalContact ( 1 ));
2020-04-16 00:42:57 +02:00
}
2024-03-20 10:43:51 +01:00
$sendtocc = '' ;
2020-04-16 00:42:57 +02:00
if ( $send_internal_cc ) {
2023-11-17 11:39:16 +01:00
$sendtocc = getDolGlobalString ( 'TICKET_NOTIFICATION_EMAIL_FROM' );
2020-04-16 00:42:57 +02:00
}
2023-11-17 11:39:16 +01:00
$from = getDolGlobalString ( 'TICKET_NOTIFICATION_EMAIL_FROM' );
2022-02-07 17:38:32 +01:00
$is_sent = false ;
2020-04-16 00:42:57 +02:00
if ( is_array ( $array_receiver ) && count ( $array_receiver ) > 0 ) {
2021-02-26 13:27:00 +01:00
foreach ( $array_receiver as $key => $receiver ) {
2020-04-16 00:42:57 +02:00
$deliveryreceipt = 0 ;
$filepath = $filename_list ;
$filename = $mimefilename_list ;
$mimetype = $mimetype_list ;
2022-08-11 01:09:56 +02:00
// Send email
$old_MAIN_MAIL_AUTOCOPY_TO = getDolGlobalString ( 'MAIN_MAIL_AUTOCOPY_TO' );
2024-03-16 15:51:21 +01:00
if ( getDolGlobalString ( 'TICKET_DISABLE_MAIL_AUTOCOPY_TO' )) {
2020-04-16 00:42:57 +02:00
$conf -> global -> MAIN_MAIL_AUTOCOPY_TO = '' ;
}
2022-08-11 01:09:56 +02:00
2022-10-24 20:30:58 +02:00
$upload_dir_tmp = $conf -> user -> dir_output . " / " . $user -> id . '/temp' ;
2022-10-24 20:28:36 +02:00
2020-04-16 00:42:57 +02:00
include_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php' ;
2020-01-23 12:53:24 +01:00
$trackid = " tic " . $this -> id ;
2022-11-13 00:22:24 +01:00
$moreinheader = 'X-Dolibarr-Info: sendTicketMessageByEmail' . " \r \n " ;
if ( ! empty ( $this -> email_msgid )) {
2024-03-15 19:39:08 +01:00
// We must also add 1 entry In-Reply-To: <$this->email_msgid> with Message-ID we respond from (See RFC5322).
$moreinheader .= 'In-Reply-To: <' . $this -> email_msgid . '>' . " \r \n " ;
2024-04-01 19:11:08 +02:00
// TODO We should now be able to give the in_reply_to as a dedicated parameter of new CMailFile() instead of into $moreinheader.
2024-03-15 19:39:08 +01:00
}
// We should add here also a header 'References:'
// According to RFC5322, we should add here all the References fields of the initial message concatenated with
// the Message-ID of the message we respond from (but each ID must be once).
$references = '' ;
2024-04-01 19:11:08 +02:00
if ( ! empty ( $this -> origin_references )) { // $this->origin_references should be '<'.$this->origin_references.'>'
2024-03-19 18:12:13 +01:00
$references .= ( empty ( $references ) ? '' : ' ' ) . $this -> origin_references ;
}
2024-04-02 10:09:05 +02:00
if ( ! empty ( $this -> email_msgid ) && ! preg_match ( '/' . preg_quote ( $this -> email_msgid , '/' ) . '/' , $references )) {
2024-04-01 19:11:08 +02:00
$references .= ( empty ( $references ) ? '' : ' ' ) . '<' . $this -> email_msgid . '>' ;
}
2024-03-15 19:39:08 +01:00
if ( $references ) {
$moreinheader .= 'References: ' . $references . " \r \n " ;
2024-04-01 19:11:08 +02:00
// TODO We should now be able to give the references as a dedicated parameter of new CMailFile() instead of into $moreinheader.
2022-11-13 00:22:24 +01:00
}
$mailfile = new CMailFile ( $subject , $receiver , $from , $message , $filepath , $mimetype , $filename , $sendtocc , '' , $deliveryreceipt , - 1 , '' , '' , $trackid , $moreinheader , 'ticket' , '' , $upload_dir_tmp );
2024-03-15 19:39:08 +01:00
2020-04-16 00:42:57 +02:00
if ( $mailfile -> error ) {
setEventMessages ( $mailfile -> error , null , 'errors' );
} else {
$result = $mailfile -> sendfile ();
if ( $result ) {
setEventMessages ( $langs -> trans ( 'MailSuccessfulySent' , $mailfile -> getValidAddress ( $from , 2 ), $mailfile -> getValidAddress ( $receiver , 2 )), null , 'mesgs' );
2022-02-07 17:38:32 +01:00
$is_sent = true ;
2020-04-16 00:42:57 +02:00
} else {
$langs -> load ( " other " );
if ( $mailfile -> error ) {
setEventMessages ( $langs -> trans ( 'ErrorFailedToSendMail' , $from , $receiver ), null , 'errors' );
dol_syslog ( $langs -> trans ( 'ErrorFailedToSendMail' , $from , $receiver ) . ' : ' . $mailfile -> error );
} else {
setEventMessages ( 'No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS' , null , 'errors' );
}
}
}
2022-08-11 01:09:56 +02:00
2024-03-16 15:51:21 +01:00
if ( getDolGlobalString ( 'TICKET_DISABLE_MAIL_AUTOCOPY_TO' )) {
2020-04-16 00:42:57 +02:00
$conf -> global -> MAIN_MAIL_AUTOCOPY_TO = $old_MAIN_MAIL_AUTOCOPY_TO ;
}
}
} else {
$langs -> load ( " other " );
setEventMessages ( $langs -> trans ( 'ErrorMailRecipientIsEmptyForSendTicketMessage' ), null , 'warnings' );
}
2022-11-13 00:22:24 +01:00
2022-02-07 17:38:32 +01:00
return $is_sent ;
2020-04-16 00:42:57 +02:00
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
2023-08-05 14:59:31 +02:00
* Load indicators for dashboard ( this -> nbtodo and this -> nbtodolate )
2020-04-16 00:42:57 +02:00
*
2023-08-05 14:59:31 +02:00
* @ param User $user Object user
2024-10-13 16:45:42 +02:00
* @ param 'opened' | 'signed' $mode " opened " for askprice to close , " signed " for proposal to invoice
* @ return WorkboardResponse | int <- 1 , - 1 > Return integer < 0 if KO , WorkboardResponse if OK
2020-04-16 00:42:57 +02:00
*/
public function load_board ( $user , $mode )
{
// phpcs:enable
2023-08-05 14:59:31 +02:00
global $user , $langs ;
2020-04-16 00:42:57 +02:00
$now = dol_now ();
2021-03-14 09:14:43 +01:00
$delay_warning = 0 ;
2020-04-16 00:42:57 +02:00
$clause = " WHERE " ;
$sql = " SELECT p.rowid, p.ref, p.datec as datec " ;
$sql .= " FROM " . MAIN_DB_PREFIX . " ticket as p " ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && isModEnabled ( 'societe' ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' ) && ! $user -> socid ) {
2020-04-16 00:42:57 +02:00
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " societe_commerciaux as sc ON p.fk_soc = sc.fk_soc " ;
2021-08-23 17:41:11 +02:00
$sql .= " WHERE sc.fk_user = " . (( int ) $user -> id );
2020-04-16 00:42:57 +02:00
$clause = " AND " ;
}
$sql .= $clause . " p.entity IN ( " . getEntity ( 'ticket' ) . " ) " ;
2021-02-26 13:27:00 +01:00
if ( $mode == 'opened' ) {
$sql .= " AND p.fk_statut NOT IN ( " . Ticket :: STATUS_CLOSED . " , " . Ticket :: STATUS_CANCELED . " ) " ;
}
if ( $user -> socid ) {
2021-08-23 17:41:11 +02:00
$sql .= " AND p.fk_soc = " . (( int ) $user -> socid );
2021-02-26 13:27:00 +01:00
}
2020-04-16 00:42:57 +02:00
$resql = $this -> db -> query ( $sql );
2021-02-26 13:27:00 +01:00
if ( $resql ) {
2020-04-16 00:42:57 +02:00
$label = $labelShort = '' ;
$status = '' ;
if ( $mode == 'opened' ) {
$status = 'openall' ;
//$delay_warning = $conf->ticket->warning_delay;
2024-05-30 13:37:17 +02:00
$delay_warning = 0 ;
2020-04-16 00:42:57 +02:00
$label = $langs -> trans ( " MenuListNonClosed " );
$labelShort = $langs -> trans ( " MenuListNonClosed " );
}
$response = new WorkboardResponse ();
//$response->warning_delay = $delay_warning / 60 / 60 / 24;
$response -> label = $label ;
$response -> labelShort = $labelShort ;
$response -> url = DOL_URL_ROOT . '/ticket/list.php?search_fk_statut[]=' . $status ;
$response -> img = img_object ( '' , " ticket " );
// This assignment in condition is not a bug. It allows walking the results.
2021-02-26 13:27:00 +01:00
while ( $obj = $this -> db -> fetch_object ( $resql )) {
2020-04-16 00:42:57 +02:00
$response -> nbtodo ++ ;
2021-02-26 13:27:00 +01:00
if ( $mode == 'opened' ) {
2024-12-22 08:02:36 +01:00
$datelimit = ( int ) $this -> db -> jdate ( $obj -> datec ) + ( int ) $delay_warning ;
2021-03-14 09:14:43 +01:00
if ( $datelimit < $now ) {
2020-04-16 00:42:57 +02:00
//$response->nbtodolate++;
}
}
}
return $response ;
2020-05-21 15:05:19 +02:00
} else {
2020-04-16 00:42:57 +02:00
$this -> error = $this -> db -> lasterror ();
return - 1 ;
}
}
/**
* Load indicator this -> nb of global stats widget
*
2023-12-06 15:46:39 +01:00
* @ return int Return integer < 0 if ko , > 0 if ok
2020-04-16 00:42:57 +02:00
*/
2024-01-18 18:55:53 +01:00
public function loadStateBoard ()
2020-04-16 00:42:57 +02:00
{
2024-01-18 18:55:53 +01:00
global $user ;
2020-04-16 00:42:57 +02:00
$this -> nb = array ();
$clause = " WHERE " ;
$sql = " SELECT count(p.rowid) as nb " ;
$sql .= " FROM " . MAIN_DB_PREFIX . " ticket as p " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " societe as s ON p.fk_soc = s.rowid " ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2020-04-16 00:42:57 +02:00
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " societe_commerciaux as sc ON s.rowid = sc.fk_soc " ;
2021-08-23 17:41:11 +02:00
$sql .= " WHERE sc.fk_user = " . (( int ) $user -> id );
2020-04-16 00:42:57 +02:00
$clause = " AND " ;
}
$sql .= " " . $clause . " p.entity IN ( " . getEntity ( 'ticket' ) . " ) " ;
$resql = $this -> db -> query ( $sql );
2021-02-26 13:27:00 +01:00
if ( $resql ) {
2020-04-16 00:42:57 +02:00
// This assignment in condition is not a bug. It allows walking the results.
2021-02-26 13:27:00 +01:00
while ( $obj = $this -> db -> fetch_object ( $resql )) {
2020-04-16 00:42:57 +02:00
$this -> nb [ " ticket " ] = $obj -> nb ;
}
$this -> db -> free ( $resql );
return 1 ;
2020-05-21 15:05:19 +02:00
} else {
2020-04-16 00:42:57 +02:00
dol_print_error ( $this -> db );
$this -> error = $this -> db -> lasterror ();
return - 1 ;
}
}
2020-10-16 17:08:23 +02:00
/**
* 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 ( 'ticket' );
return CommonObject :: commonReplaceThirdparty ( $db , $origin_id , $dest_id , $tables );
}
2023-01-17 15:19:34 +01:00
/**
2024-08-07 01:20:43 +02:00
* Return clickable link of object ( with eventually picto )
2023-01-17 15:19:34 +01:00
*
2025-02-03 11:24:16 +01:00
* @ param string $option Where point the link ( 0 => main card , 1 , 2 => shipment , 'nolink' => No link )
* @ param ? array < string , mixed > $arraydata Array of data
* @ return string HTML Code for Kanban thumb .
2023-01-17 15:19:34 +01:00
*/
2023-01-18 22:27:52 +01:00
public function getKanbanView ( $option = '' , $arraydata = null )
2023-01-17 15:19:34 +01:00
{
2023-03-07 22:04:40 +01:00
global $langs ;
$selected = ( empty ( $arraydata [ 'selected' ]) ? 0 : $arraydata [ 'selected' ]);
2023-01-17 15:19:34 +01:00
$return = '<div class="box-flex-item box-flex-grow-zero">' ;
$return .= '<div class="info-box info-box-sm">' ;
$return .= '<span class="info-box-icon bg-infobox-action">' ;
$return .= img_picto ( '' , $this -> picto );
$return .= '</span>' ;
$return .= '<div class="info-box-content">' ;
2023-05-11 11:03:26 +02:00
$return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">' . ( method_exists ( $this , 'getNomUrl' ) ? $this -> getNomUrl ( 1 ) : $this -> ref ) . '</span>' ;
2023-10-17 15:43:56 +02:00
if ( $selected >= 0 ) {
$return .= '<input id="cb' . $this -> id . '" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="' . $this -> id . '"' . ( $selected ? ' checked="checked"' : '' ) . '>' ;
}
2023-02-21 02:12:20 +01:00
if ( ! empty ( $arraydata [ 'user_assignment' ])) {
$return .= '<br><span class="info-box-label" title="' . dol_escape_htmltag ( $langs -> trans ( " AssignedTo " )) . '">' . $arraydata [ 'user_assignment' ] . '</span>' ;
2023-01-17 15:19:34 +01:00
}
if ( property_exists ( $this , 'type_code' ) && ! empty ( $this -> type_code )) {
2023-02-21 02:12:20 +01:00
$return .= '<br>' ;
$return .= '<div class="tdoverflowmax125 inline-block">' . $langs -> getLabelFromKey ( $this -> db , 'TicketTypeShort' . $this -> type_code , 'c_ticket_type' , 'code' , 'label' , $this -> type_code ) . '</div>' ;
2023-01-17 15:19:34 +01:00
}
if ( method_exists ( $this , 'getLibStatut' )) {
2023-12-19 11:51:48 +01:00
$return .= '<br><div class="info-box-status">' . $this -> getLibStatut ( 3 ) . '</div>' ;
2023-01-17 15:19:34 +01:00
}
$return .= '</div>' ;
$return .= '</div>' ;
$return .= '</div>' ;
2024-02-07 19:36:23 +01:00
2023-01-17 15:19:34 +01:00
return $return ;
}
2024-02-07 19:36:23 +01:00
/**
* Create a document onto disk according to template module .
*
2024-10-19 01:21:41 +02:00
* @ param string $modele Force template to use ( '' to not force )
* @ param Translate $outputlangs object lang a utiliser pour traduction
* @ param int < 0 , 1 > $hidedetails Hide details of lines
* @ param int < 0 , 1 > $hidedesc Hide description
* @ param int < 0 , 1 > $hideref Hide ref
* @ param ? array < string , mixed > $moreparams Array to provide more information
* @ return int 0 if KO , 1 if OK
2024-02-07 19:36:23 +01:00
*/
public function generateDocument ( $modele , $outputlangs , $hidedetails = 0 , $hidedesc = 0 , $hideref = 0 , $moreparams = null )
{
global $langs ;
$langs -> load ( " ticket " );
$outputlangs -> load ( " ticket " );
if ( ! dol_strlen ( $modele )) {
$modele = 'generic_ticket_odt' ;
if ( ! empty ( $this -> model_pdf )) {
$modele = $this -> model_pdf ;
} elseif ( getDolGlobalString ( 'TICKET_ADDON_PDF' )) {
$modele = getDolGlobalString ( 'TICKET_ADDON_PDF' );
}
}
$modelpath = " core/modules/ticket/doc/ " ;
return $this -> commonGenerateDocument ( $modelpath , $modele , $outputlangs , $hidedetails , $hidedesc , $hideref , $moreparams );
}
2018-03-10 04:23:59 +01:00
}