From 11e15255bd2c373972b07c52ef007c27987b7838 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 12 Feb 2022 16:59:29 +0100 Subject: [PATCH 1/5] FIX API REST for setup values --- htdocs/api/class/api_setup.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index 85a45e9ff45..e937980e96d 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -1112,7 +1112,7 @@ class Setup extends DolibarrApi $sql = "SELECT rowid AS id, zip, town, fk_county, fk_pays AS fk_country"; $sql .= " FROM ".MAIN_DB_PREFIX."c_ziptown as t"; - $sql .= " AND t.active = ".$active; + $sql .= " WHERE t.active = ".$active; if ($zipcode) { $sql .= " AND t.zip LIKE '%".$this->db->escape($zipcode)."%'"; } From 8d3e97bab98324f5c29b8603ccb130d849a214c3 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 12 Feb 2022 19:21:07 +0100 Subject: [PATCH 2/5] Update api_setup.class.php --- htdocs/api/class/api_setup.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index e937980e96d..1b687e09d28 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -1098,7 +1098,7 @@ class Setup extends DolibarrApi * @param int $page Page number (starting from zero) * @param string $zipcode To filter on zipcode * @param string $town To filter on city name - * @param int $active Payment term is active or not {@min 0} {@max 1} + * @param int $active Town is active or not {@min 0} {@max 1} * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" * @return array List of towns * From 1c8c98ac0f22b61ffcd05b4a672fa92d9329df2d Mon Sep 17 00:00:00 2001 From: Thomas Negre Date: Thu, 17 Feb 2022 09:53:36 +0100 Subject: [PATCH 3/5] fix ticket public interface: When sending an email to the customer, If a custom URL had been provided for ticket public interface, the link provided in the email did lead to the index of the public interface. We want it to lead to /view.php --- htdocs/public/ticket/create_ticket.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/ticket/create_ticket.php b/htdocs/public/ticket/create_ticket.php index 29ec7983930..31b44f39b18 100644 --- a/htdocs/public/ticket/create_ticket.php +++ b/htdocs/public/ticket/create_ticket.php @@ -211,7 +211,7 @@ if ($action == 'create_ticket' && GETPOST('add', 'alpha')) { $message .= ($conf->global->TICKET_MESSAGE_MAIL_NEW ? $conf->global->TICKET_MESSAGE_MAIL_NEW : $langs->transnoentities('TicketNewEmailBody'))."\n\n"; $message .= $langs->transnoentities('TicketNewEmailBodyInfosTicket')."\n"; - $url_public_ticket = ($conf->global->TICKET_URL_PUBLIC_INTERFACE ? $conf->global->TICKET_URL_PUBLIC_INTERFACE.'/' : dol_buildpath('/public/ticket/view.php', 2)).'?track_id='.$object->track_id; + $url_public_ticket = ($conf->global->TICKET_URL_PUBLIC_INTERFACE ? $conf->global->TICKET_URL_PUBLIC_INTERFACE : dol_buildpath('/public/ticket', 2)).'/view.php?track_id='.$object->track_id; $infos_new_ticket = $langs->transnoentities('TicketNewEmailBodyInfosTrackId', ''.$object->track_id.'')."\n"; $infos_new_ticket .= $langs->transnoentities('TicketNewEmailBodyInfosTrackUrl')."\n\n"; From 1ad8700810096cb8b5964a7cdda14881f965ce45 Mon Sep 17 00:00:00 2001 From: Thomas Negre Date: Thu, 17 Feb 2022 11:08:23 +0100 Subject: [PATCH 4/5] empty commit to force travis try rebuild From 2e744a4517cf59fd939856ac1d97e7d054511c6d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Feb 2022 19:18:22 +0100 Subject: [PATCH 5/5] Update create_ticket.php --- htdocs/public/ticket/create_ticket.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/ticket/create_ticket.php b/htdocs/public/ticket/create_ticket.php index 31b44f39b18..1c9ca3aafe0 100644 --- a/htdocs/public/ticket/create_ticket.php +++ b/htdocs/public/ticket/create_ticket.php @@ -211,7 +211,7 @@ if ($action == 'create_ticket' && GETPOST('add', 'alpha')) { $message .= ($conf->global->TICKET_MESSAGE_MAIL_NEW ? $conf->global->TICKET_MESSAGE_MAIL_NEW : $langs->transnoentities('TicketNewEmailBody'))."\n\n"; $message .= $langs->transnoentities('TicketNewEmailBodyInfosTicket')."\n"; - $url_public_ticket = ($conf->global->TICKET_URL_PUBLIC_INTERFACE ? $conf->global->TICKET_URL_PUBLIC_INTERFACE : dol_buildpath('/public/ticket', 2)).'/view.php?track_id='.$object->track_id; + $url_public_ticket = ($conf->global->TICKET_URL_PUBLIC_INTERFACE ? $conf->global->TICKET_URL_PUBLIC_INTERFACE.'/view.php' : dol_buildpath('/public/ticket/view.php', 2)).'?track_id='.$object->track_id; $infos_new_ticket = $langs->transnoentities('TicketNewEmailBodyInfosTrackId', ''.$object->track_id.'')."\n"; $infos_new_ticket .= $langs->transnoentities('TicketNewEmailBodyInfosTrackUrl')."\n\n";