From 094719e0990be574ecb54aa9d94f2d74b04f0a6c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 2 Jun 2019 15:53:16 +0200 Subject: [PATCH 1/4] 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/4] 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/4] 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') . ''; From ab77051317a54c20f4b7ff8b3cf67c317f7b45ee Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 4 Jun 2019 20:03:27 +0200 Subject: [PATCH 4/4] Fix time delay for purge --- htdocs/admin/tools/purge.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php index 48968ff1d27..b83399b9853 100644 --- a/htdocs/admin/tools/purge.php +++ b/htdocs/admin/tools/purge.php @@ -48,6 +48,17 @@ if (! empty($conf->syslog->enabled)) */ if ($action=='purge' && ! preg_match('/^confirm/i',$choice) && ($choice != 'allfiles' || $confirm == 'yes') ) { + // Increase limit of time. Works only if we are not in safe mode + $ExecTimeLimit=600; + if (!empty($ExecTimeLimit)) + { + $err=error_reporting(); + error_reporting(0); // Disable all errors + //error_reporting(E_ALL); + @set_time_limit($ExecTimeLimit); // Need more than 240 on Windows 7/64 + error_reporting($err); + } + require_once DOL_DOCUMENT_ROOT.'/core/class/utils.class.php'; $utils = new Utils($db); $result = $utils->purgeFiles($choice);