From 50d5ee5e21c5470abacceccfd663a8993acec225 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 23 Dec 2022 15:52:48 +0100 Subject: [PATCH] Fix deletion of one page --- htdocs/website/class/websitepage.class.php | 4 ++-- htdocs/website/index.php | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index d04608387cb..8660ca0b0c1 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -116,8 +116,8 @@ class WebsitePage extends CommonObject */ public $fk_object; - const STATUS_DRAFT = 0; - const STATUS_VALIDATED = 1; + const STATUS_DRAFT = 0; // offline + const STATUS_VALIDATED = 1; // online /** diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 6e4d96880fb..3b270576f03 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -3336,8 +3336,7 @@ if (!GETPOST('hide_websitemenu')) { print ''; // Delete - //print ''; - if ($websitepage->status == $websitepage::STATUS_DRAFT || !$atleastonepage) { + if ($websitepage->status != $websitepage::STATUS_DRAFT) { $disabled = ' disabled="disabled"'; $title = $langs->trans("WebpageMustBeDisabled", $langs->transnoentitiesnoconv($websitepage->LibStatut(0, 0))); $url = '#';