From 094719e0990be574ecb54aa9d94f2d74b04f0a6c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 2 Jun 2019 15:53:16 +0200 Subject: [PATCH 1/3] Fix prefix --- htdocs/website/class/website.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index 48319b02cab..f05dd0723b4 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -844,8 +844,10 @@ class Website extends CommonObject } foreach($listofpages as $pageid => $objectpageold) { - $line = 'INSERT INTO '.MAIN_DB_PREFIX.'website_page(rowid, fk_page, fk_website, pageurl, title, description, keyword, status, date_creation, tms, lang, import_key, grabbed_from, content)'; - $line.= " VALUES("; + // Warning: We must keep llx_ here. It is a generic SQL. + $line = 'INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, title, description, keyword, status, date_creation, tms, lang, import_key, grabbed_from, content)'; + + $line.= " VALUES("; $line.= $objectpageold->newid."+__MAXROWID__, "; $line.= ($objectpageold->newfk_page ? $this->db->escape($objectpageold->newfk_page)."+__MAXROWID__" : "null").", "; $line.= "__WEBSITE_ID__, "; From 7b3242693b764a7ff9f6883416ef8492a6c34d47 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 4 Jun 2019 18:17:07 +0200 Subject: [PATCH 2/3] FIX default value for duration of validity can be set from generic feature. --- htdocs/comm/propal/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index ba68e3324bb..86d6244f81d 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1533,7 +1533,7 @@ if ($action == 'create') print ''; // Validaty duration - print '' . $langs->trans("ValidityDuration") . ' ' . $langs->trans("days") . ''; + print '' . $langs->trans("ValidityDuration") . ' ' . $langs->trans("days") . ''; // Terms of payment print '' . $langs->trans('PaymentConditionsShort') . ''; From 36df2f10261b8b5aa99d6ad2942fdc17aedc4031 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 4 Jun 2019 18:45:01 +0200 Subject: [PATCH 3/3] Fix css --- htdocs/comm/propal/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 86d6244f81d..8f186c0bc2e 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -320,7 +320,7 @@ if (empty($reshook)) $datep = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); $date_delivery = dol_mktime(12, 0, 0, GETPOST('date_livraisonmonth'), GETPOST('date_livraisonday'), GETPOST('date_livraisonyear')); - $duration = GETPOST('duree_validite'); + $duration = GETPOST('duree_validite', 'int'); if (empty($datep)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); @@ -1533,7 +1533,7 @@ if ($action == 'create') print ''; // Validaty duration - print '' . $langs->trans("ValidityDuration") . ' ' . $langs->trans("days") . ''; + print '' . $langs->trans("ValidityDuration") . ' ' . $langs->trans("days") . ''; // Terms of payment print '' . $langs->trans('PaymentConditionsShort') . '';