Obsolescence: finalizing the implementation of the flag (hide obsolete objects, show an icon on hyperlinks and a tag on the object details, user preference defaulting to the new setting 'show_obsolete_data')

SVN:trunk[4739]
This commit is contained in:
Romain Quetiez
2017-05-17 08:51:10 +00:00
parent ebe467b77a
commit 248f8d6fd4
45 changed files with 372 additions and 57 deletions

View File

@@ -188,6 +188,21 @@ class utils
return $bRet;
}
/**
* Helper to be called by the GUI and define if the user will see obsolete data (otherwise, the user will have to dig further)
* @return bool
*/
public static function ShowObsoleteData()
{
$bDefault = MetaModel::GetConfig()->Get('show_obsolete_data'); // default is false
$bShow = appUserPreferences::GetPref('show_obsolete_data', $bDefault);
if (static::IsArchiveMode())
{
$bShow = true;
}
return $bShow;
}
public static function ReadParam($sName, $defaultValue = "", $bAllowCLI = false, $sSanitizationFilter = 'parameter')
{
global $argv;