Archives: show the menu 'activate archive mode' only if there is at least one archivable class

SVN:trunk[4701]
This commit is contained in:
Romain Quetiez
2017-04-27 08:53:23 +00:00
parent de2eed5187
commit b238283104

View File

@@ -657,8 +657,8 @@ class UserRights
} }
else else
{ {
// As of now, anybody can swith to the archive mode // As of now, anybody can switch to the archive mode as soon as there is an archivable class
$bRet = true; $bRet = (count(MetaModel::EnumArchivableClasses()) > 0);
$_SESSION['archive_allowed'] = $bRet; $_SESSION['archive_allowed'] = $bRet;
} }
return $bRet; return $bRet;