From 8bf02f0d832fc2ed648cc964873573815d285886 Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Sun, 19 Jan 2025 15:43:04 +0100 Subject: [PATCH 1/2] Debug error message --- htdocs/accountancy/bookkeeping/card.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 0da31291160..aa5709bdf14 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -248,12 +248,11 @@ if (empty($reshook)) { $result = $object->fetch($id, null, $mode); $piece_num = (int) $object->piece_num; - if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $action = 'create'; - } else { + } elseif ($result > 0) { $result = $object->delete($user, 0, $mode); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -980,7 +979,7 @@ if ($action == 'create') { print ''; } } else { - print load_fiche_titre($langs->trans("NoRecords")); + print $langs->trans("NoRecordFound"); } } From 4538c8935a23f9f7c4309ae5e8b9ec11df1be53a Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Sun, 19 Jan 2025 19:05:01 +0100 Subject: [PATCH 2/2] Debug v21 - The cachedelay was wrong --- htdocs/website/index.php | 2 +- htdocs/website/samples/wrapper.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 7a8acf4e21b..bb683e00854 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -4149,7 +4149,7 @@ if ($action == 'editcss') { $htmlhelp = $langs->trans('RSSFeedDesc'); print $form->textwithpicto($langs->trans('RSSFeed'), $htmlhelp, 1, 'help', '', 0, 2, ''); print ''; - print '/wrapper.php?rss=1[&l=XX][&limit=123]'; + print '/wrapper.php?rss=1[&l=XX][&limit=99][&cachedelay=99]'; print ''; print ''; diff --git a/htdocs/website/samples/wrapper.php b/htdocs/website/samples/wrapper.php index f7127a3d815..abcea982bcc 100644 --- a/htdocs/website/samples/wrapper.php +++ b/htdocs/website/samples/wrapper.php @@ -35,6 +35,7 @@ $entity = GETPOSTINT('entity') ? GETPOSTINT('entity') : $conf->entity; $original_file = GETPOST("file", "alpha"); $l = GETPOST('l', 'aZ09'); $limit = GETPOSTINT('limit'); +$cachedelay = GETPOSTINT('cachedelay'); // The delay in second of the cache // Parameters for RSS $rss = GETPOST('rss', 'aZ09'); @@ -115,7 +116,6 @@ $refname = basename(dirname($original_file)."/"); if ($rss) { $format = 'rss'; $type = ''; - $cachedelay = 0; $filename = $original_file; $dir_temp = $conf->website->dir_temp;