Merge branch 'develop' into ticketsup_core
This commit is contained in:
commit
40cf236f92
@ -1049,7 +1049,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
||||
{
|
||||
if (preg_match('/\.sql$/i',$file) && ! preg_match('/\.key\.sql$/i',$file) && substr($file,0,4) == 'llx_' && substr($file,0,4) != 'data')
|
||||
{
|
||||
$result=run_sql($dir.$file,1,'',1);
|
||||
$result=run_sql($dir.$file, empty($conf->global->MAIN_DISPLAY_SQL_INSTALL_LOG)?0:1, '', 1);
|
||||
if ($result <= 0) $error++;
|
||||
}
|
||||
}
|
||||
@ -1067,7 +1067,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
||||
{
|
||||
if (preg_match('/\.key\.sql$/i',$file) && substr($file,0,4) == 'llx_' && substr($file,0,4) != 'data')
|
||||
{
|
||||
$result=run_sql($dir.$file,1,'',1);
|
||||
$result=run_sql($dir.$file, empty($conf->global->MAIN_DISPLAY_SQL_INSTALL_LOG)?0:1, '', 1);
|
||||
if ($result <= 0) $error++;
|
||||
}
|
||||
}
|
||||
@ -1085,7 +1085,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
||||
{
|
||||
if (preg_match('/\.sql$/i',$file) && ! preg_match('/\.key\.sql$/i',$file) && substr($file,0,4) == 'data')
|
||||
{
|
||||
$result=run_sql($dir.$file,1,'',1);
|
||||
$result=run_sql($dir.$file, empty($conf->global->MAIN_DISPLAY_SQL_INSTALL_LOG)?0:1, '', 1);
|
||||
if ($result <= 0) $error++;
|
||||
}
|
||||
}
|
||||
@ -1103,7 +1103,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
||||
{
|
||||
if (preg_match('/\.sql$/i',$file) && ! preg_match('/\.key\.sql$/i',$file) && substr($file,0,6) == 'update')
|
||||
{
|
||||
$result=run_sql($dir.$file,1,'',1);
|
||||
$result=run_sql($dir.$file, empty($conf->global->MAIN_DISPLAY_SQL_INSTALL_LOG)?0:1, '', 1);
|
||||
if ($result <= 0) $error++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1106,7 +1106,7 @@ class Ticketsup extends CommonObject
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "c_ticketsup_severity";
|
||||
$sql .= " WHERE active > 0";
|
||||
$sql .= " ORDER BY pos";
|
||||
dol_syslog(get_class($this) . "::load_cache_severities_tickets sql=" . $sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this) . "::loadCacheSeveritiesTickets sql=" . $sql, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $this->db->num_rows($resql);
|
||||
@ -1133,8 +1133,8 @@ class Ticketsup extends CommonObject
|
||||
/**
|
||||
* Return status label of object
|
||||
*
|
||||
* @param number $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
||||
* @return string
|
||||
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
||||
* @return string Label
|
||||
*/
|
||||
public function getLibStatut($mode = 0)
|
||||
{
|
||||
@ -1143,13 +1143,13 @@ class Ticketsup extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* Return status label of object
|
||||
* Return status label of object
|
||||
*
|
||||
* @param int $statut id statut
|
||||
* @param number $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
||||
* @return string
|
||||
* @param string $statut id statut
|
||||
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
||||
* @return string Label
|
||||
*/
|
||||
public function libStatut($statut, $mode = 0)
|
||||
function LibStatut($statut, $mode = 0)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
@ -1294,10 +1294,11 @@ class Ticketsup extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Return clckable link to object
|
||||
* @param int $withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
||||
* @param string $option Where to point the link
|
||||
* @return string
|
||||
* Return clickable link to object
|
||||
*
|
||||
* @param int $withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
||||
* @param string $option Sur quoi pointe le lien
|
||||
* @return string Chaine avec URL
|
||||
*/
|
||||
public function getNomUrl($withpicto = 0, $option = '')
|
||||
{
|
||||
@ -1330,11 +1331,11 @@ class Ticketsup extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark a message as read
|
||||
* Mark a message as read
|
||||
*
|
||||
* @param User $user User for action
|
||||
* @param int $notrigger Lauch trigger or not
|
||||
* @return int 1 if ok, -1 otherwise
|
||||
* @param User $user Object user
|
||||
* @param int $notrigger No trigger
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function markAsRead($user, $notrigger = 0)
|
||||
{
|
||||
@ -1379,12 +1380,12 @@ class Ticketsup extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign ticket to an user
|
||||
* Mark a message as read
|
||||
*
|
||||
* @param User $user User for action
|
||||
* @param int $id_assign_user IP user assigned
|
||||
* @param int $notrigger Disable trigger if 1
|
||||
* @return number
|
||||
* @param User $user Object user
|
||||
* @param int $id_assign_user ID of user assigned
|
||||
* @param int $notrigger Disable trigger
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function assignUser($user, $id_assign_user, $notrigger = 0)
|
||||
{
|
||||
@ -1488,11 +1489,11 @@ class Ticketsup extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Send notification of changes by email
|
||||
* Send notification of changes by email
|
||||
*
|
||||
* @param User $user User that create
|
||||
* @param string $message Log message
|
||||
* @return int <0 if KO, >0 if OK (number of emails sent)
|
||||
* @param User $user User that create
|
||||
* @param string $log_message Log message
|
||||
* @return int <0 if KO, >0 if OK (number of emails sent)
|
||||
*/
|
||||
private function sendLogByEmail($user, $message)
|
||||
{
|
||||
@ -2101,6 +2102,7 @@ class Ticketsup extends CommonObject
|
||||
/**
|
||||
* Return id of all contacts for ticket
|
||||
*
|
||||
* @return array Array of contacts
|
||||
*/
|
||||
public function getTicketAllCustomerContacts()
|
||||
{
|
||||
@ -2114,9 +2116,10 @@ class Ticketsup extends CommonObject
|
||||
|
||||
/**
|
||||
* Send message
|
||||
* @param string $subject Subject for message
|
||||
* @param string $texte Text for message
|
||||
* @return int 1 if ok, -1 otherwise
|
||||
*
|
||||
* @param string $subject Subject
|
||||
* @param string $texte Message to send
|
||||
* @return int <0 if KO, or number of changes if OK
|
||||
*/
|
||||
public function messageSend($subject, $texte)
|
||||
{
|
||||
@ -2138,7 +2141,8 @@ class Ticketsup extends CommonObject
|
||||
$sendto = $obj->firstname . " " . $obj->lastname . " <" . $obj->email . ">";
|
||||
$actiondefid = $obj->adid;
|
||||
|
||||
if (dol_strlen($sendto)) {
|
||||
if (dol_strlen($sendto))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||
$application = ($conf->global->MAIN_APPLICATION_TITLE ? $conf->global->MAIN_APPLICATION_TITLE : 'Dolibarr ERP/CRM');
|
||||
|
||||
@ -2239,12 +2243,12 @@ class Ticketsup extends CommonObject
|
||||
* Get array of all contacts for a ticket
|
||||
* Override method of file commonobject.class.php to add phone number
|
||||
*
|
||||
* @param int $statut Status of lines to get (-1=all)
|
||||
* @param string $source Source of contact: external or thirdparty (llx_socpeople) or internal (llx_user)
|
||||
* @param int $list 0:Return array contains all properties, 1:Return array contains just id
|
||||
* @return array Array of contacts
|
||||
* @param int $statut Status of lines to get (-1=all)
|
||||
* @param string $source Source of contact: external or thirdparty (llx_socpeople) or internal (llx_user)
|
||||
* @param int $list 0:Return array contains all properties, 1:Return array contains just id
|
||||
* @return array Array of contacts
|
||||
*/
|
||||
public function listeContact($statut = -1, $source = 'external', $list = 0)
|
||||
function liste_contact($statut = -1, $source = 'external', $list = 0)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
@ -2453,10 +2457,10 @@ class Ticketsup extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche la premiere photo du ticket
|
||||
* Return if at least one photo is available
|
||||
*
|
||||
* @param string $sdir Repertoire a scanner
|
||||
* @return boolean true si photo dispo, false sinon
|
||||
* @param string $sdir Directory to scan
|
||||
* @return boolean True if at least one photo is available, False if not
|
||||
*/
|
||||
function is_photo_available($sdir)
|
||||
{
|
||||
|
||||
1
htdocs/ticketsup/tpl/index.html
Normal file
1
htdocs/ticketsup/tpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
|
||||
@ -16,6 +16,12 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($conf) || ! is_object($conf))
|
||||
{
|
||||
print "Error, template page can't be called as URL";
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- BEGIN PHP TEMPLATE -->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user