Alexander Nicolaysen Sørnes : objectManager: Don't attempt to show deleted entries
Alexander Nicolaysen Sørnes
asornes at winehq.org
Sun Jun 28 07:51:36 CDT 2009
Module: appdb
Branch: master
Commit: a3031b6e218d88765a47bed1bdb37e307f9132df
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=a3031b6e218d88765a47bed1bdb37e307f9132df
Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date: Sun Jun 28 14:11:52 2009 +0200
objectManager: Don't attempt to show deleted entries
---
include/application.php | 3 ---
include/objectManager.php | 4 ++++
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/application.php b/include/application.php
index f342345..137580c 100644
--- a/include/application.php
+++ b/include/application.php
@@ -745,9 +745,6 @@ class Application {
{
$sError = 'You do not have permission to view this entry';
- if($this->objectGetState() == 'deleted')
- $sError = 'This entry has been deleted; it\'s contents may have been moved to another entry';
-
objectManager::error_exit($sError);
}
diff --git a/include/objectManager.php b/include/objectManager.php
index a695cda..dd6edfd 100644
--- a/include/objectManager.php
+++ b/include/objectManager.php
@@ -1303,6 +1303,10 @@ class ObjectManager
if(!$oObject->objectGetId())
$this->error_exit("Entry not found (class: {$this->sClass}, id: {$this->iId})");
+ /* Check if the entry has been deleted */
+ if($oObject->objectGetState() == 'deleted')
+ $this->error_exit("This entry has been deleted (class: {$this->sClass}, id: {$this->iId})<br />Its content may have been moved to another entry");
+
$aVars = $this->get_custom_vars($aClean, "view");
echo "<br />";
More information about the wine-cvs
mailing list