N.1108 return exception if $bMustBeFound and result is archived

SVN:trunk[5025]
This commit is contained in:
Pierre Goiffon
2017-10-16 14:42:17 +00:00
parent 426a0933b1
commit 3fd7dae8f9
3 changed files with 74 additions and 15 deletions

View File

@@ -141,6 +141,9 @@ class utils
}
protected static $bPageMode = null;
/**
* @var boolean[]
*/
protected static $aModes = array();
public static function InitArchiveMode()
@@ -164,6 +167,10 @@ class utils
self::$bPageMode = ($iCurrent == 1);
}
/**
* @param boolean $bMode if true then activate archive mode (archived objects are visible), otherwise archived objects are
* hidden (archive = "soft deletion")
*/
public static function PushArchiveMode($bMode)
{
array_push(self::$aModes, $bMode);
@@ -174,6 +181,9 @@ class utils
array_pop(self::$aModes);
}
/**
* @return boolean true if archive mode is enabled
*/
public static function IsArchiveMode()
{
if (count(self::$aModes) > 0)