From 3babdb9798702da37f45ff1ce8c51bca26e0c238 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 28 Jun 2018 13:45:30 +0200 Subject: [PATCH 01/10] Fix filters not saved when ordering --- htdocs/product/reassort.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index f71601e7bc0..295bf530f91 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -242,6 +242,8 @@ if ($resql) if ($fourn_id) $param.="&fourn_id=".$fourn_id; if ($snom) $param.="&snom=".$snom; if ($sref) $param.="&sref=".$sref; + if ($toolowstock) $param.="&toolowstock=".$toolowstock; + if ($search_categ) $param.="&search_categ=".$search_categ; $formProduct = new FormProduct($db); $formProduct->loadWarehouses(); From 5756955d5544df5d12b9b4ba1502e4f9b5516f0e Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 28 Jun 2018 14:26:51 +0200 Subject: [PATCH 02/10] Fix link to create event had no socid if from thirdparty card --- htdocs/core/class/html.formactions.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 2d66661c839..a39b4840017 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -196,7 +196,7 @@ class FormActions if (! empty($conf->agenda->enabled)) { - $buttontoaddnewevent = ''; + $buttontoaddnewevent = ''; $buttontoaddnewevent.= $langs->trans("AddEvent"); $buttontoaddnewevent.= ''; } From 875cee84c7dca5d11dcdc995fe0389294a9d74ee Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 3 Jul 2018 13:47:53 +0200 Subject: [PATCH 03/10] Fix: missing "paid" field --- htdocs/loan/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/loan/index.php b/htdocs/loan/index.php index d1436287db3..afaefc4575c 100644 --- a/htdocs/loan/index.php +++ b/htdocs/loan/index.php @@ -71,7 +71,7 @@ $loan_static = new Loan($db); llxHeader(); -$sql = "SELECT l.rowid, l.label, l.capital, l.datestart, l.dateend,"; +$sql = "SELECT l.rowid, l.label, l.capital, l.paid, l.datestart, l.dateend,"; $sql.= " SUM(pl.amount_capital) as alreadypayed"; $sql.= " FROM ".MAIN_DB_PREFIX."loan as l LEFT JOIN ".MAIN_DB_PREFIX."payment_loan AS pl"; $sql.= " ON l.rowid = pl.fk_loan"; @@ -83,7 +83,7 @@ if ($filtre) { $filtre=str_replace(":","=",$filtre); $sql .= " AND ".$filtre; } -$sql.= " GROUP BY l.rowid, l.label, l.capital, l.datestart, l.dateend"; +$sql.= " GROUP BY l.rowid, l.label, l.capital, l.paid, l.datestart, l.dateend"; $sql.= $db->order($sortfield,$sortorder); $nbtotalofrecords = ''; From 0bb7f84f87945f31ded1c2722d9d3eba8fb33752 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 3 Jul 2018 14:11:00 +0200 Subject: [PATCH 04/10] Fix: check if multicompany object exists --- htdocs/public/stripe/ipn.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php index 19f9b8c80bc..c5d2cd85e5c 100644 --- a/htdocs/public/stripe/ipn.php +++ b/htdocs/public/stripe/ipn.php @@ -88,7 +88,7 @@ $user = new User($db); $user->fetch(5); $user->getrights(); -if (! empty($conf->multicompany->enabled) && ! empty($conf->stripeconnect->enabled)) { +if (! empty($conf->multicompany->enabled) && ! empty($conf->stripeconnect->enabled) && is_object($mc)) { $sql = "SELECT entity"; $sql.= " FROM ".MAIN_DB_PREFIX."oauth_token"; $sql.= " WHERE service = '".$db->escape($service)."' and tokenstring = '%".$db->escape($event->account)."%'"; @@ -102,10 +102,12 @@ if (! empty($conf->multicompany->enabled) && ! empty($conf->stripeconnect->enabl $obj = $db->fetch_object($result); $key=$obj->entity; } - else {$key=1; + else { + $key=1; } } - else {$key=1; + else { + $key=1; } $ret=$mc->switchEntity($key); if (! $res && file_exists("../../main.inc.php")) $res=@include("../../main.inc.php"); From 74b9f87cab84a3d0bb6480c0b8f34c336742661e Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 5 Jul 2018 14:35:12 +0200 Subject: [PATCH 05/10] Fix ticket : missing file for numbering --- .../core/modules/ticket/mod_ticket_simple.php | 2 +- .../modules/ticket/mod_ticket_universal.php | 8 +- htdocs/core/modules/ticket/modules_ticket.php | 120 ++++++++++++++++++ 3 files changed, 125 insertions(+), 5 deletions(-) create mode 100644 htdocs/core/modules/ticket/modules_ticket.php diff --git a/htdocs/core/modules/ticket/mod_ticket_simple.php b/htdocs/core/modules/ticket/mod_ticket_simple.php index ac4347dc4db..b70b9babd05 100644 --- a/htdocs/core/modules/ticket/mod_ticket_simple.php +++ b/htdocs/core/modules/ticket/mod_ticket_simple.php @@ -23,7 +23,7 @@ * \brief File with class to manage the numbering module Simple for ticket references */ -require_once DOL_DOCUMENT_ROOT.'/core/modules/modules_ticket.php'; +require_once DOL_DOCUMENT_ROOT.'/core/modules/ticket/modules_ticket.php'; /** * Class to manage the numbering module Simple for ticket references diff --git a/htdocs/core/modules/ticket/mod_ticket_universal.php b/htdocs/core/modules/ticket/mod_ticket_universal.php index edc943e8341..2d521f18a5b 100644 --- a/htdocs/core/modules/ticket/mod_ticket_universal.php +++ b/htdocs/core/modules/ticket/mod_ticket_universal.php @@ -22,7 +22,7 @@ * \brief Fichier contenant la classe du modele de numerotation de reference de projet Universal */ -require_once DOL_DOCUMENT_ROOT.'/core/modules/modules_ticket.php'; +require_once DOL_DOCUMENT_ROOT.'/core/modules/ticket/modules_ticket.php'; /** * Classe du modele de numerotation de reference de projet Universal @@ -52,7 +52,7 @@ class mod_ticket_universal extends ModeleNumRefTicket $texte .= '
'; $texte .= ''; $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("Ticket"), $langs->transnoentities("Ticket")); @@ -63,7 +63,7 @@ class mod_ticket_universal extends ModeleNumRefTicket // Parametrage du prefix $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; @@ -109,7 +109,7 @@ class mod_ticket_universal extends ModeleNumRefTicket include_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; // On defini critere recherche compteur - $mask = $conf->global->TICKETSUP_UNIVERSAL_MASK; + $mask = $conf->global->TICKET_UNIVERSAL_MASK; if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/ticket/modules_ticket.php b/htdocs/core/modules/ticket/modules_ticket.php new file mode 100644 index 00000000000..d6f8b06d0e8 --- /dev/null +++ b/htdocs/core/modules/ticket/modules_ticket.php @@ -0,0 +1,120 @@ + + * Copyright (C) 2014 Marcos García + * + * 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 + * along with this program. If not, see . + * or see http://www.gnu.org/ + */ + +/** + * \file htdocs/core/modules/ticket/modules_ticket.php + * \ingroup project + * \brief File that contain parent class for projects models + * and parent class for projects numbering models + */ + +/** + * Classe mere des modeles de numerotation des references de projets + */ +abstract class ModeleNumRefTicket +{ + public $error = ''; + + /** + * Return if a module can be used or not + * + * @return boolean true if module can be used + */ + public function isEnabled() + { + return true; + } + + /** + * Renvoi la description par defaut du modele de numerotation + * + * @return string Texte descripif + */ + public function info() + { + global $langs; + $langs->load("ticket"); + return $langs->trans("NoDescription"); + } + + /** + * Renvoi un exemple de numerotation + * + * @return string Example + */ + public function getExample() + { + global $langs; + $langs->load("ticket"); + return $langs->trans("NoExample"); + } + + /** + * Test si les numeros deja en vigueur dans la base ne provoquent pas de + * de conflits qui empechera cette numerotation de fonctionner. + * + * @return boolean false si conflit, true si ok + */ + public function canBeActivated() + { + return true; + } + + /** + * Renvoi prochaine valeur attribuee + * + * @param Societe $objsoc Object third party + * @param Project $project Object project + * @return string Valeur + */ + public function getNextValue($objsoc, $project) + { + global $langs; + return $langs->trans("NotAvailable"); + } + + /** + * Renvoi version du module numerotation + * + * @return string Valeur + */ + public function getVersion() + { + global $langs; + $langs->load("admin"); + + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } + + if ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } + + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } + + if ($this->version) { + return $this->version; + } + + return $langs->trans("NotAvailable"); + } +} From 39f890d84af7f30ad4efadab9cecaa14b8eb139d Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 5 Jul 2018 14:51:00 +0200 Subject: [PATCH 06/10] Fix TICKETSUP var name --- htdocs/core/modules/modTicket.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/modTicket.class.php b/htdocs/core/modules/modTicket.class.php index 72fec5ebe01..9cf2c097e3b 100644 --- a/htdocs/core/modules/modTicket.class.php +++ b/htdocs/core/modules/modTicket.class.php @@ -108,7 +108,7 @@ class modTicket extends DolibarrModules // Example: $this->const = array(); $this->const[1] = array('TICKETS_ENABLE_PUBLIC_INTERFACE', 'chaine', '1', 'Enable ticket public interface'); - $this->const[2] = array('TICKETSUP_ADDON', 'chaine', 'mod_ticket_simple', 'Ticket ref module'); + $this->const[2] = array('TICKET_ADDON', 'chaine', 'mod_ticket_simple', 'Ticket ref module'); $this->tabs = array( 'thirdparty:+ticket:Tickets:@ticket:$user->rights->ticket->read:/ticket/list.php?socid=__ID__', From badcbd78d8c056d2a3d1d97c8ef625fffb59329f Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 5 Jul 2018 15:20:38 +0200 Subject: [PATCH 07/10] Rename ticketsup public directory --- .../public/{ticketsup => ticket}/create_ticket.php | 0 .../public/{ticketsup => ticket}/img/bg_ticket.png | Bin htdocs/public/{ticketsup => ticket}/index.php | 0 htdocs/public/{ticketsup => ticket}/list.php | 0 htdocs/public/{ticketsup => ticket}/view.php | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename htdocs/public/{ticketsup => ticket}/create_ticket.php (100%) rename htdocs/public/{ticketsup => ticket}/img/bg_ticket.png (100%) rename htdocs/public/{ticketsup => ticket}/index.php (100%) rename htdocs/public/{ticketsup => ticket}/list.php (100%) rename htdocs/public/{ticketsup => ticket}/view.php (100%) diff --git a/htdocs/public/ticketsup/create_ticket.php b/htdocs/public/ticket/create_ticket.php similarity index 100% rename from htdocs/public/ticketsup/create_ticket.php rename to htdocs/public/ticket/create_ticket.php diff --git a/htdocs/public/ticketsup/img/bg_ticket.png b/htdocs/public/ticket/img/bg_ticket.png similarity index 100% rename from htdocs/public/ticketsup/img/bg_ticket.png rename to htdocs/public/ticket/img/bg_ticket.png diff --git a/htdocs/public/ticketsup/index.php b/htdocs/public/ticket/index.php similarity index 100% rename from htdocs/public/ticketsup/index.php rename to htdocs/public/ticket/index.php diff --git a/htdocs/public/ticketsup/list.php b/htdocs/public/ticket/list.php similarity index 100% rename from htdocs/public/ticketsup/list.php rename to htdocs/public/ticket/list.php diff --git a/htdocs/public/ticketsup/view.php b/htdocs/public/ticket/view.php similarity index 100% rename from htdocs/public/ticketsup/view.php rename to htdocs/public/ticket/view.php From 05ed721a8c80a0121d860459ad6b5b2a94daa549 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 6 Jul 2018 13:09:07 +0200 Subject: [PATCH 08/10] Fix name of constant for module TICKET --- htdocs/admin/ticket.php | 154 +++++++++--------- htdocs/core/class/html.formticket.class.php | 10 +- htdocs/core/lib/ticket.lib.php | 6 +- htdocs/core/modules/modTicket.class.php | 2 +- ...erface_50_modTicket_TicketEmail.class.php} | 26 +-- htdocs/public/ticket/create_ticket.php | 26 +-- htdocs/public/ticket/index.php | 4 +- htdocs/public/ticket/list.php | 2 +- htdocs/public/ticket/view.php | 2 +- htdocs/ticket/card.php | 4 +- htdocs/ticket/class/actions_ticket.class.php | 50 +++--- htdocs/ticket/class/ticket.class.php | 14 +- htdocs/ticket/contact.php | 2 +- htdocs/ticket/css/styles.css.php | 2 +- htdocs/ticket/document.php | 2 +- htdocs/ticket/history.php | 4 +- htdocs/ticket/index.php | 4 +- htdocs/ticket/list.php | 2 +- 18 files changed, 158 insertions(+), 158 deletions(-) rename htdocs/core/triggers/{interface_50_modTicketsup_TicketEmail.class.php => interface_50_modTicket_TicketEmail.class.php} (92%) diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php index c6f5e49ff01..742f966e4cc 100644 --- a/htdocs/admin/ticket.php +++ b/htdocs/admin/ticket.php @@ -67,92 +67,92 @@ if ($action == 'updateMask') { } elseif ($action == 'setvar') { include_once DOL_DOCUMENT_ROOT . "/core/lib/files.lib.php"; - $notification_email = GETPOST('TICKETS_NOTIFICATION_EMAIL_FROM', 'alpha'); + $notification_email = GETPOST('TICKET_NOTIFICATION_EMAIL_FROM', 'alpha'); if (!empty($notification_email)) { - $res = dolibarr_set_const($db, 'TICKETS_NOTIFICATION_EMAIL_FROM', $notification_email, 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_FROM', $notification_email, 'chaine', 0, '', $conf->entity); } else { - $res = dolibarr_set_const($db, 'TICKETS_NOTIFICATION_EMAIL_FROM', '', 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_FROM', '', 'chaine', 0, '', $conf->entity); } if (!$res > 0) { $error++; } // altairis : differentiate notification email FROM and TO - $notification_email_to = GETPOST('TICKETS_NOTIFICATION_EMAIL_TO', 'alpha'); + $notification_email_to = GETPOST('TICKET_NOTIFICATION_EMAIL_TO', 'alpha'); if (!empty($notification_email_to)) { - $res = dolibarr_set_const($db, 'TICKETS_NOTIFICATION_EMAIL_TO', $notification_email_to, 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_TO', $notification_email_to, 'chaine', 0, '', $conf->entity); } else { - $res = dolibarr_set_const($db, 'TICKETS_NOTIFICATION_EMAIL_TO', '', 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_TO', '', 'chaine', 0, '', $conf->entity); } if (!$res > 0) { $error++; } - $mail_new_ticket = GETPOST('TICKETS_MESSAGE_MAIL_NEW', 'alpha'); + $mail_new_ticket = GETPOST('TICKET_MESSAGE_MAIL_NEW', 'alpha'); if (!empty($mail_new_ticket)) { - $res = dolibarr_set_const($db, 'TICKETS_MESSAGE_MAIL_NEW', $mail_new_ticket, 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_NEW', $mail_new_ticket, 'chaine', 0, '', $conf->entity); } else { - $res = dolibarr_set_const($db, 'TICKETS_MESSAGE_MAIL_NEW', $langs->trans('TicketMessageMailNewText'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_NEW', $langs->trans('TicketMessageMailNewText'), 'chaine', 0, '', $conf->entity); } if (!$res > 0) { $error++; } - $mail_intro = GETPOST('TICKETS_MESSAGE_MAIL_INTRO', 'alpha'); + $mail_intro = GETPOST('TICKET_MESSAGE_MAIL_INTRO', 'alpha'); if (!empty($mail_intro)) { - $res = dolibarr_set_const($db, 'TICKETS_MESSAGE_MAIL_INTRO', $mail_intro, 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_INTRO', $mail_intro, 'chaine', 0, '', $conf->entity); } else { - $res = dolibarr_set_const($db, 'TICKETS_MESSAGE_MAIL_INTRO', $langs->trans('TicketMessageMailIntroText'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_INTRO', $langs->trans('TicketMessageMailIntroText'), 'chaine', 0, '', $conf->entity); } if (!$res > 0) { $error++; } - $mail_signature = GETPOST('TICKETS_MESSAGE_MAIL_SIGNATURE', 'alpha'); + $mail_signature = GETPOST('TICKET_MESSAGE_MAIL_SIGNATURE', 'alpha'); if (!empty($mail_signature)) { - $res = dolibarr_set_const($db, 'TICKETS_MESSAGE_MAIL_SIGNATURE', $mail_signature, 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_SIGNATURE', $mail_signature, 'chaine', 0, '', $conf->entity); } else { - $res = dolibarr_set_const($db, 'TICKETS_MESSAGE_MAIL_SIGNATURE', $langs->trans('TicketMessageMailSignatureText'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_SIGNATURE', $langs->trans('TicketMessageMailSignatureText'), 'chaine', 0, '', $conf->entity); } if (!$res > 0) { $error++; } - $url_interface = GETPOST('TICKETS_URL_PUBLIC_INTERFACE', 'alpha'); + $url_interface = GETPOST('TICKET_URL_PUBLIC_INTERFACE', 'alpha'); if (!empty($mail_signature)) { - $res = dolibarr_set_const($db, 'TICKETS_URL_PUBLIC_INTERFACE', $url_interface, 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_URL_PUBLIC_INTERFACE', $url_interface, 'chaine', 0, '', $conf->entity); } else { - $res = dolibarr_set_const($db, 'TICKETS_URL_PUBLIC_INTERFACE', '', 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_URL_PUBLIC_INTERFACE', '', 'chaine', 0, '', $conf->entity); } if (!$res > 0) { $error++; } - $topic_interface = GETPOST('TICKETS_PUBLIC_INTERFACE_TOPIC', 'alpha'); + $topic_interface = GETPOST('TICKET_PUBLIC_INTERFACE_TOPIC', 'alpha'); if (!empty($mail_signature)) { - $res = dolibarr_set_const($db, 'TICKETS_PUBLIC_INTERFACE_TOPIC', $topic_interface, 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_PUBLIC_INTERFACE_TOPIC', $topic_interface, 'chaine', 0, '', $conf->entity); } else { - $res = dolibarr_set_const($db, 'TICKETS_PUBLIC_INTERFACE_TOPIC', '', 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_PUBLIC_INTERFACE_TOPIC', '', 'chaine', 0, '', $conf->entity); } if (!$res > 0) { $error++; } - $text_home = GETPOST('TICKETS_PUBLIC_TEXT_HOME', 'alpha'); + $text_home = GETPOST('TICKET_PUBLIC_TEXT_HOME', 'alpha'); if (!empty($mail_signature)) { - $res = dolibarr_set_const($db, 'TICKETS_PUBLIC_TEXT_HOME', $text_home, 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HOME', $text_home, 'chaine', 0, '', $conf->entity); } else { - $res = dolibarr_set_const($db, 'TICKETS_PUBLIC_TEXT_HOME', $langs->trans('TicketPublicInterfaceTextHome'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HOME', $langs->trans('TicketPublicInterfaceTextHome'), 'chaine', 0, '', $conf->entity); } if (!$res > 0) { $error++; } - $text_help = GETPOST('TICKETS_PUBLIC_TEXT_HELP_MESSAGE', 'alpha'); + $text_help = GETPOST('TICKET_PUBLIC_TEXT_HELP_MESSAGE', 'alpha'); if (!empty($text_help)) { - $res = dolibarr_set_const($db, 'TICKETS_PUBLIC_TEXT_HELP_MESSAGE', $text_help, 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HELP_MESSAGE', $text_help, 'chaine', 0, '', $conf->entity); } else { - $res = dolibarr_set_const($db, 'TICKETS_PUBLIC_TEXT_HELP_MESSAGE', $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HELP_MESSAGE', $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'), 'chaine', 0, '', $conf->entity); } if (!$res > 0) { $error++; @@ -160,34 +160,34 @@ if ($action == 'updateMask') { } if ($action == 'setvarother') { - $param_enable_public_interface = GETPOST('TICKETS_ENABLE_PUBLIC_INTERFACE', 'alpha'); - $res = dolibarr_set_const($db, 'TICKETS_ENABLE_PUBLIC_INTERFACE', $param_enable_public_interface, 'chaine', 0, '', $conf->entity); + $param_enable_public_interface = GETPOST('TICKET_ENABLE_PUBLIC_INTERFACE', 'alpha'); + $res = dolibarr_set_const($db, 'TICKET_ENABLE_PUBLIC_INTERFACE', $param_enable_public_interface, 'chaine', 0, '', $conf->entity); if (!$res > 0) { $error++; } - $param_must_exists = GETPOST('TICKETS_EMAIL_MUST_EXISTS', 'alpha'); - $res = dolibarr_set_const($db, 'TICKETS_EMAIL_MUST_EXISTS', $param_must_exists, 'chaine', 0, '', $conf->entity); + $param_must_exists = GETPOST('TICKET_EMAIL_MUST_EXISTS', 'alpha'); + $res = dolibarr_set_const($db, 'TICKET_EMAIL_MUST_EXISTS', $param_must_exists, 'chaine', 0, '', $conf->entity); if (!$res > 0) { $error++; } - $param_disable_email = GETPOST('TICKETS_DISABLE_ALL_MAILS', 'alpha'); - $res = dolibarr_set_const($db, 'TICKETS_DISABLE_ALL_MAILS', $param_disable_email, 'chaine', 0, '', $conf->entity); + $param_disable_email = GETPOST('TICKET_DISABLE_ALL_MAILS', 'alpha'); + $res = dolibarr_set_const($db, 'TICKET_DISABLE_ALL_MAILS', $param_disable_email, 'chaine', 0, '', $conf->entity); if (!$res > 0) { $error++; } - $param_activate_log_by_email = GETPOST('TICKETS_ACTIVATE_LOG_BY_EMAIL', 'alpha'); - $res = dolibarr_set_const($db, 'TICKETS_ACTIVATE_LOG_BY_EMAIL', $param_activate_log_by_email, 'chaine', 0, '', $conf->entity); + $param_activate_log_by_email = GETPOST('TICKET_ACTIVATE_LOG_BY_EMAIL', 'alpha'); + $res = dolibarr_set_const($db, 'TICKET_ACTIVATE_LOG_BY_EMAIL', $param_activate_log_by_email, 'chaine', 0, '', $conf->entity); if (!$res > 0) { $error++; } if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { - $param_show_module_logo = GETPOST('TICKETS_SHOW_MODULE_LOGO', 'alpha'); - $res = dolibarr_set_const($db, 'TICKETS_SHOW_MODULE_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity); + $param_show_module_logo = GETPOST('TICKET_SHOW_MODULE_LOGO', 'alpha'); + $res = dolibarr_set_const($db, 'TICKET_SHOW_MODULE_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity); if (!$res > 0) { $error++; } @@ -195,21 +195,21 @@ if ($action == 'setvarother') { if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { - $param_notification_also_main_addressemail = GETPOST('TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS', 'alpha'); - $res = dolibarr_set_const($db, 'TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail, 'chaine', 0, '', $conf->entity); + $param_notification_also_main_addressemail = GETPOST('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', 'alpha'); + $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail, 'chaine', 0, '', $conf->entity); if (!$res > 0) { $error++; } } - $param_limit_view = GETPOST('TICKETS_LIMIT_VIEW_ASSIGNED_ONLY', 'alpha'); - $res = dolibarr_set_const($db, 'TICKETS_LIMIT_VIEW_ASSIGNED_ONLY', $param_limit_view, 'chaine', 0, '', $conf->entity); + $param_limit_view = GETPOST('TICKET_LIMIT_VIEW_ASSIGNED_ONLY', 'alpha'); + $res = dolibarr_set_const($db, 'TICKET_LIMIT_VIEW_ASSIGNED_ONLY', $param_limit_view, 'chaine', 0, '', $conf->entity); if (!$res > 0) { $error++; } - $param_auto_assign = GETPOST('TICKETS_AUTO_ASSIGN_USER_CREATE', 'alpha'); - $res = dolibarr_set_const($db, 'TICKETS_AUTO_ASSIGN_USER_CREATE', $param_auto_assign, 'chaine', 0, '', $conf->entity); + $param_auto_assign = GETPOST('TICKET_AUTO_ASSIGN_USER_CREATE', 'alpha'); + $res = dolibarr_set_const($db, 'TICKET_AUTO_ASSIGN_USER_CREATE', $param_auto_assign, 'chaine', 0, '', $conf->entity); if (!$res > 0) { $error++; } @@ -358,10 +358,10 @@ print '
' . $langs->trans("Mask") . ':' . $form->textwithpicto('', $tooltip, 1, 1) . '' . $form->textwithpicto('', $tooltip, 1, 1) . ' 
'; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print '
' . $langs->trans("TicketsActivatePublicInterface") . ''; if ($conf->use_javascript_ajax) { - print ajax_constantonoff('TICKETS_ENABLE_PUBLIC_INTERFACE'); + print ajax_constantonoff('TICKET_ENABLE_PUBLIC_INTERFACE'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("TICKETS_ENABLE_PUBLIC_INTERFACE", $arrval, $conf->global->TICKETS_ENABLE_PUBLIC_INTERFACE); + print $form->selectarray("TICKET_ENABLE_PUBLIC_INTERFACE", $arrval, $conf->global->TICKET_ENABLE_PUBLIC_INTERFACE); } print ''; @@ -373,10 +373,10 @@ print '
' . $langs->trans("TicketsEmailMustExist") . ''; if ($conf->use_javascript_ajax) { - print ajax_constantonoff('TICKETS_EMAIL_MUST_EXISTS'); + print ajax_constantonoff('TICKET_EMAIL_MUST_EXISTS'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("TICKETS_EMAIL_MUST_EXISTS", $arrval, $conf->global->TICKETS_EMAIL_MUST_EXISTS); + print $form->selectarray("TICKET_EMAIL_MUST_EXISTS", $arrval, $conf->global->TICKET_EMAIL_MUST_EXISTS); } print ''; @@ -390,10 +390,10 @@ print '
' . $langs->trans("TicketsShowModuleLogo") . ''; if ($conf->use_javascript_ajax) { - print ajax_constantonoff('TICKETS_SHOW_MODULE_LOGO'); + print ajax_constantonoff('TICKET_SHOW_MODULE_LOGO'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("TICKETS_SHOW_MODULE_LOGO", $arrval, $conf->global->TICKETS_SHOW_MODULE_LOGO); + print $form->selectarray("TICKET_SHOW_MODULE_LOGO", $arrval, $conf->global->TICKET_SHOW_MODULE_LOGO); } print ''; @@ -406,10 +406,10 @@ print '
' . $langs->trans("TicketsShowCompanyLogo") . ''; if ($conf->use_javascript_ajax) { - print ajax_constantonoff('TICKETS_SHOW_COMPANY_LOGO'); + print ajax_constantonoff('TICKET_SHOW_COMPANY_LOGO'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("TICKETS_SHOW_COMPANY_LOGO", $arrval, $conf->global->TICKETS_SHOW_COMPANY_LOGO); + print $form->selectarray("TICKET_SHOW_COMPANY_LOGO", $arrval, $conf->global->TICKET_SHOW_COMPANY_LOGO); } print ''; @@ -426,10 +426,10 @@ print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; +print ''; print ''; @@ -542,18 +542,18 @@ print ''; // Email de réception des notifications print ''; print ''; +print ''; print ''; print ''; // Texte de création d'un ticket -$mail_mesg_new = $conf->global->TICKETS_MESSAGE_MAIL_NEW ? $conf->global->TICKETS_MESSAGE_MAIL_NEW : $langs->trans('TicketNewEmailBody'); +$mail_mesg_new = $conf->global->TICKET_MESSAGE_MAIL_NEW ? $conf->global->TICKET_MESSAGE_MAIL_NEW : $langs->trans('TicketNewEmailBody'); print ''; print ''; // Texte d'introduction -$mail_intro = $conf->global->TICKETS_MESSAGE_MAIL_INTRO ? $conf->global->TICKETS_MESSAGE_MAIL_INTRO : $langs->trans('TicketMessageMailIntroText'); +$mail_intro = $conf->global->TICKET_MESSAGE_MAIL_INTRO ? $conf->global->TICKET_MESSAGE_MAIL_INTRO : $langs->trans('TicketMessageMailIntroText'); print ''; print ''; // Texte de signature -$mail_signature = $conf->global->TICKETS_MESSAGE_MAIL_SIGNATURE ? $conf->global->TICKETS_MESSAGE_MAIL_SIGNATURE : $langs->trans('TicketMessageMailSignatureText'); +$mail_signature = $conf->global->TICKET_MESSAGE_MAIL_SIGNATURE ? $conf->global->TICKET_MESSAGE_MAIL_SIGNATURE : $langs->trans('TicketMessageMailSignatureText'); print ''; print ''; print "\n"; // Url public interface -$url_interface = $conf->global->TICKETS_URL_PUBLIC_INTERFACE; +$url_interface = $conf->global->TICKET_URL_PUBLIC_INTERFACE; print ''; +print ''; print ''; print ''; // Interface topic -$url_interface = $conf->global->TICKETS_PUBLIC_INTERFACE_TOPIC; +$url_interface = $conf->global->TICKET_PUBLIC_INTERFACE_TOPIC; print ''; +print ''; print ''; print ''; // Texte d'accueil homepage -$public_text_home = $conf->global->TICKETS_PUBLIC_TEXT_HOME ? $conf->global->TICKETS_PUBLIC_TEXT_HOME : $langs->trans('TicketPublicInterfaceTextHome'); +$public_text_home = $conf->global->TICKET_PUBLIC_TEXT_HOME ? $conf->global->TICKET_PUBLIC_TEXT_HOME : $langs->trans('TicketPublicInterfaceTextHome'); print ''; print ''; // Texte d'aide à la saisie du message -$public_text_help_message = $conf->global->TICKETS_PUBLIC_TEXT_HELP_MESSAGE ? $conf->global->TICKETS_PUBLIC_TEXT_HELP_MESSAGE : $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'); +$public_text_help_message = $conf->global->TICKET_PUBLIC_TEXT_HELP_MESSAGE ? $conf->global->TICKET_PUBLIC_TEXT_HELP_MESSAGE : $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'); print ''; print '
' . $langs->trans("TicketsDisableEmail") . ''; if ($conf->use_javascript_ajax) { - print ajax_constantonoff('TICKETS_DISABLE_ALL_MAILS'); + print ajax_constantonoff('TICKET_DISABLE_ALL_MAILS'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("TICKETS_DISABLE_ALL_MAILS", $arrval, $conf->global->TICKETS_DISABLE_ALL_MAILS); + print $form->selectarray("TICKET_DISABLE_ALL_MAILS", $arrval, $conf->global->TICKET_DISABLE_ALL_MAILS); } print ''; @@ -441,10 +441,10 @@ print '
' . $langs->trans("TicketsLogEnableEmail") . ''; if ($conf->use_javascript_ajax) { - print ajax_constantonoff('TICKETS_ACTIVATE_LOG_BY_EMAIL'); + print ajax_constantonoff('TICKET_ACTIVATE_LOG_BY_EMAIL'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("TICKETS_ACTIVATE_LOG_BY_EMAIL", $arrval, $conf->global->TICKETS_ACTIVATE_LOG_BY_EMAIL); + print $form->selectarray("TICKET_ACTIVATE_LOG_BY_EMAIL", $arrval, $conf->global->TICKET_ACTIVATE_LOG_BY_EMAIL); } print ''; @@ -458,10 +458,10 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) print '
' . $langs->trans("TicketsEmailAlsoSendToMainAddress") . ''; if ($conf->use_javascript_ajax) { - print ajax_constantonoff('TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS'); + print ajax_constantonoff('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS", $arrval, $conf->global->TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS); + print $form->selectarray("TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS", $arrval, $conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS); } print ''; @@ -474,10 +474,10 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) print '
' . $langs->trans("TicketsLimitViewAssignedOnly") . ''; if ($conf->use_javascript_ajax) { - print ajax_constantonoff('TICKETS_LIMIT_VIEW_ASSIGNED_ONLY'); + print ajax_constantonoff('TICKET_LIMIT_VIEW_ASSIGNED_ONLY'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("TICKETS_LIMIT_VIEW_ASSIGNED_ONLY", $arrval, $conf->global->TICKETS_LIMIT_VIEW_ASSIGNED_ONLY); + print $form->selectarray("TICKET_LIMIT_VIEW_ASSIGNED_ONLY", $arrval, $conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY); } print ''; @@ -494,10 +494,10 @@ if (!$conf->use_javascript_ajax) { print '
' . $langs->trans("TicketsAutoAssignTicket") . ''; if ($conf->use_javascript_ajax) { - print ajax_constantonoff('TICKETS_AUTO_ASSIGN_USER_CREATE'); + print ajax_constantonoff('TICKET_AUTO_ASSIGN_USER_CREATE'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("TICKETS_AUTO_ASSIGN_USER_CREATE", $arrval, $conf->global->TICKETS_AUTO_ASSIGN_USER_CREATE); + print $form->selectarray("TICKET_AUTO_ASSIGN_USER_CREATE", $arrval, $conf->global->TICKET_AUTO_ASSIGN_USER_CREATE); } print ''; @@ -533,7 +533,7 @@ if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) { // Email d'envoi des notifications print '
' . $langs->trans("TicketEmailNotificationFrom") . ''; -print ''; print $form->textwithpicto('', $langs->trans("TicketEmailNotificationFromHelp"), 1, 'help'); print '
' . $langs->trans("TicketEmailNotificationTo") . ''; -print ''; print $form->textwithpicto('', $langs->trans("TicketEmailNotificationToHelp"), 1, 'help'); print '
' . $langs->trans("TicketNewEmailBodyLabel") . ''; print ''; require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; -$doleditor = new DolEditor('TICKETS_MESSAGE_MAIL_NEW', $mail_mesg_new, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70); +$doleditor = new DolEditor('TICKET_MESSAGE_MAIL_NEW', $mail_mesg_new, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70); $doleditor->Create(); print ''; @@ -561,11 +561,11 @@ print $form->textwithpicto('', $langs->trans("TicketNewEmailBodyHelp"), 1, 'help print '
' . $langs->trans("TicketMessageMailIntroLabelAdmin") . ''; print ''; require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; -$doleditor = new DolEditor('TICKETS_MESSAGE_MAIL_INTRO', $mail_intro, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70); +$doleditor = new DolEditor('TICKET_MESSAGE_MAIL_INTRO', $mail_intro, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70); $doleditor->Create(); print ''; @@ -573,11 +573,11 @@ print $form->textwithpicto('', $langs->trans("TicketMessageMailIntroHelpAdmin"), print '
' . $langs->trans("TicketMessageMailSignatureLabelAdmin") . ''; print ''; require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; -$doleditor = new DolEditor('TICKETS_MESSAGE_MAIL_SIGNATURE', $mail_signature, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70); +$doleditor = new DolEditor('TICKET_MESSAGE_MAIL_SIGNATURE', $mail_signature, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70); $doleditor->Create(); print ''; @@ -589,31 +589,31 @@ print '' . $langs->trans("PublicInterface") . '
' . $langs->trans("TicketUrlPublicInterfaceLabelAdmin") . ''; print ''; -print ''; print $form->textwithpicto('', $langs->trans("TicketUrlPublicInterfaceHelpAdmin"), 1, 'help'); print '
' . $langs->trans("TicketPublicInterfaceTopicLabelAdmin") . ''; print ''; -print ''; print $form->textwithpicto('', $langs->trans("TicketPublicInterfaceTopicHelp"), 1, 'help'); print '
' . $langs->trans("TicketPublicInterfaceTextHomeLabelAdmin") . ''; print ''; require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; -$doleditor = new DolEditor('TICKETS_PUBLIC_TEXT_HOME', $public_text_home, '100%', 180, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_2, 70); +$doleditor = new DolEditor('TICKET_PUBLIC_TEXT_HOME', $public_text_home, '100%', 180, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_2, 70); $doleditor->Create(); print ''; @@ -621,11 +621,11 @@ print $form->textwithpicto('', $langs->trans("TicketPublicInterfaceTextHomeHelpA print '
' . $langs->trans("TicketPublicInterfaceTextHelpMessageLabelAdmin") . ''; print ''; require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; -$doleditor = new DolEditor('TICKETS_PUBLIC_TEXT_HELP_MESSAGE', $public_text_help_message, '100%', 180, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_2, 70); +$doleditor = new DolEditor('TICKET_PUBLIC_TEXT_HELP_MESSAGE', $public_text_help_message, '100%', 180, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_2, 70); $doleditor->Create(); print ''; diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index de08557890f..1fcc865c05a 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -327,7 +327,7 @@ class FormTicket // If public form, display more information if ($this->ispublic) { - print '
' . ($conf->global->TICKETS_PUBLIC_TEXT_HELP_MESSAGE ? $conf->global->TICKETS_PUBLIC_TEXT_HELP_MESSAGE : $langs->trans('TicketPublicPleaseBeAccuratelyDescribe')) . '
'; + print '
' . ($conf->global->TICKET_PUBLIC_TEXT_HELP_MESSAGE ? $conf->global->TICKET_PUBLIC_TEXT_HELP_MESSAGE : $langs->trans('TicketPublicPleaseBeAccuratelyDescribe')) . '
'; } include_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; $uselocalbrowser = true; @@ -889,8 +889,8 @@ class FormTicket } } - if ($conf->global->TICKETS_NOTIFICATION_ALSO_MAIN_ADDRESS) { - $sendto[] = $conf->global->TICKETS_NOTIFICATION_EMAIL_TO . '(generic email)'; + if ($conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS) { + $sendto[] = $conf->global->TICKET_NOTIFICATION_EMAIL_TO . '(generic email)'; } // Print recipient list @@ -906,7 +906,7 @@ class FormTicket // Intro // External users can't send message email if ($user->rights->ticket->write && !$user->socid) { - $mail_intro = GETPOST('mail_intro') ? GETPOST('mail_intro') : $conf->global->TICKETS_MESSAGE_MAIL_INTRO; + $mail_intro = GETPOST('mail_intro') ? GETPOST('mail_intro') : $conf->global->TICKET_MESSAGE_MAIL_INTRO; print '