Fix page disabled

This commit is contained in:
Laurent Destailleur 2020-06-07 23:25:12 +02:00
parent 6ec2ff01f1
commit c41e4d9b15

View File

@ -71,7 +71,7 @@ if ($pageid > 0)
$weblangs->setDefaultLang(GETPOSTISSET('lang') ? GETPOST('lang', 'aZ09') : (empty($_COOKIE['weblangs-shortcode']) ? 'auto' : $_COOKIE['weblangs-shortcode']));
$pagelangs->setDefaultLang($websitepage->lang ? $websitepage->lang : $weblangs->shortlang);
if (!defined('USEDOLIBARREDITOR') && in_array($websitepage->type_container, array('menu', 'other')))
if (!defined('USEDOLIBARREDITOR') && (in_array($websitepage->type_container, array('menu', 'other')) || empty($websitepage->status)))
{
$weblangs->load("website");
http_response_code(404);