From 0001b42f6656882195cf50659811428b9265e4aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Sun, 29 Mar 2009 21:01:12 +0200 Subject: [PATCH] version: Show a more helpful message when viewing a deleted entry --- include/version.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/version.php b/include/version.php index a7835f6..01592c6 100644 --- a/include/version.php +++ b/include/version.php @@ -811,7 +811,14 @@ class version { { /* is this user supposed to view this version? */ if(!$_SESSION['current']->canViewVersion($this)) - util_show_error_page_and_exit("Something went wrong with the application or version id"); + { + $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); + } $iTestingId = $aVars['iTestingId'] ? $aVars['iTestingId'] : 0;