From b2382831045d31467d7161679193148673647a08 Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Thu, 27 Apr 2017 08:53:23 +0000 Subject: [PATCH] Archives: show the menu 'activate archive mode' only if there is at least one archivable class SVN:trunk[4701] --- core/userrights.class.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/userrights.class.inc.php b/core/userrights.class.inc.php index fba6c6a630..4bfea75a84 100644 --- a/core/userrights.class.inc.php +++ b/core/userrights.class.inc.php @@ -657,8 +657,8 @@ class UserRights } else { - // As of now, anybody can swith to the archive mode - $bRet = true; + // As of now, anybody can switch to the archive mode as soon as there is an archivable class + $bRet = (count(MetaModel::EnumArchivableClasses()) > 0); $_SESSION['archive_allowed'] = $bRet; } return $bRet;