From 5d78c3530b4c516e8feaf1136023c353a2b746c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 2 Mar 2021 16:34:04 +0100 Subject: [PATCH 1/3] test stickler --- htdocs/website/index.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index bae797b96c9..ecaf9e8d11b 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2211,8 +2211,7 @@ if ($action == 'generatesitemaps') { $robotcontent .= $robotsitemap."\n"; } $result = dolSaveRobotFile($filerobot, $robotcontent); - if (!$result) - { + if (!$result) { $error++; setEventMessages('Failed to write file '.$filerobot, null, 'errors'); } From 15623ae852646021c1826afe2e97b68585772b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 2 Mar 2021 16:39:04 +0100 Subject: [PATCH 2/3] fix --- htdocs/website/index.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index ecaf9e8d11b..508a871de68 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2192,22 +2192,20 @@ if ($action == 'generatesitemaps') { setEventMessages($object->error, $object->errors, 'errors'); } } - }else { + } else { dol_print_error($db); } $robotcontent = @file_get_contents($filerobot); $result = preg_replace('/\n/ims', '', $robotcontent); - if ($result) - { + if ($result) { $robotcontent = $result; } $robotsitemap = "Sitemap: ".$domainname."/".$xmlname; $result = strpos($robotcontent, 'Sitemap: '); - if ($result) - { + if ($result) { $result = preg_replace("/Sitemap.*\n/", $robotsitemap, $robotcontent); $robotcontent = $result ? $result : $robotcontent; - }else { + } else { $robotcontent .= $robotsitemap."\n"; } $result = dolSaveRobotFile($filerobot, $robotcontent); @@ -2228,7 +2226,7 @@ $formwebsite = new FormWebsite($db); $formother = new FormOther($db); // Confirm generation of website sitemaps -if ($action == 'confirmgeneratesitemaps'){ +if ($action == 'confirmgeneratesitemaps') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?website='.$website->ref, $langs->trans('ConfirmSitemapsCreation'), $langs->trans('ConfirmGenerateSitemaps', $object->ref), 'generatesitemaps', '', "yes", 1); $action = 'preview'; } From bb2a505404dd0fb8ccf89824bed36fd833aad276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 2 Mar 2021 18:26:04 +0100 Subject: [PATCH 3/3] Update eventorganization.php --- htdocs/admin/eventorganization.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/eventorganization.php b/htdocs/admin/eventorganization.php index feb200744d2..8625f182f47 100644 --- a/htdocs/admin/eventorganization.php +++ b/htdocs/admin/eventorganization.php @@ -248,7 +248,7 @@ if ($action == 'edit') { $tmp = explode(':', $val['type']); print img_picto('', 'category', 'class="pictofixedwidth"'); - print $formother->select_categories($tmp[1], $conf->global->{$constname}, $constname, 0, $langs->trans('CustomersProspectsCategoriesShort')); + print $formother->select_categories($tmp[1], $conf->global->{$constname}, $constname, 0, $langs->trans('CustomersProspectsCategoriesShort')); } else { print ''; }