From 983dc80d9ef295462e8da239e48d9782fb09112d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 13 Aug 2019 05:03:45 +0200 Subject: [PATCH] FIX Disabling a website does not put it offline --- htdocs/core/website.inc.php | 8 ++++++++ htdocs/langs/en_US/website.lang | 1 + 2 files changed, 9 insertions(+) diff --git a/htdocs/core/website.inc.php b/htdocs/core/website.inc.php index 4114fff00b7..44c5d89097a 100644 --- a/htdocs/core/website.inc.php +++ b/htdocs/core/website.inc.php @@ -93,3 +93,11 @@ if ($_SERVER['PHP_SELF'] != DOL_URL_ROOT.'/website/index.php') // If we browsing } } } + +// Show off line message +if (! defined('USEDOLIBARREDITOR') && empty($website->status)) +{ + $weblangs->load("website"); + print '


'.$weblangs->trans("SorryWebsiteIsCurrentlyOffLine").'
'; + exit; +} diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index 72b73d1c479..f01494fcdac 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -77,6 +77,7 @@ BackToListOfThirdParty=Back to list for Third Party DisableSiteFirst=Disable website first MyContainerTitle=My web site title AnotherContainer=Another container +SorryWebsiteIsCurrentlyOffLine=Sorry, this website is currently off line. Please comme back later... WEBSITE_USE_WEBSITE_ACCOUNTS=Enable the web site account table WEBSITE_USE_WEBSITE_ACCOUNTSTooltip=Enable the table to store web site accounts (login/pass) for each website / third party YouMustDefineTheHomePage=You must first define the default Home page