mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
NEW! Archiving data. Archiving is a soft delete. It can be undone. Enter the archive mode to see all the data including archives (everything is read-only in that mode). Archiving must be enabled per class (data model). Archiving is achieved by the mean of the API DBObject::Archive (or Unarchive).
SVN:trunk[4692]
This commit is contained in:
23
pages/UI.php
23
pages/UI.php
@@ -377,7 +377,25 @@ try
|
||||
$sMessageKey = $sClass.'::'.$id;
|
||||
DisplayMessages($sMessageKey, $oP);
|
||||
$oP->set_title(Dict::S('UI:ErrorPageTitle'));
|
||||
$oP->P(Dict::S('UI:ObjectDoesNotExist'));
|
||||
|
||||
// Attempt to load the object in archive mode
|
||||
DBSearch::SetArchiveModeDefault(true);
|
||||
if (is_numeric($id))
|
||||
{
|
||||
$oObj = MetaModel::GetObject($sClass, $id, false /* MustBeFound */);
|
||||
}
|
||||
else
|
||||
{
|
||||
$oObj = MetaModel::GetObjectByName($sClass, $id, false /* MustBeFound */);
|
||||
}
|
||||
if (is_null($oObj))
|
||||
{
|
||||
$oP->P(Dict::S('UI:ObjectDoesNotExist'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$oP->P(Dict::S('UI:ObjectArchived'));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1745,5 +1763,4 @@ catch(Exception $e)
|
||||
|
||||
IssueLog::Error($e->getMessage());
|
||||
}
|
||||
}
|
||||
?>
|
||||
}
|
||||
Reference in New Issue
Block a user