From fcd40be8a488d13f71b3832b3a1de78e8c719cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Wed, 24 Oct 2007 17:54:13 +0200 Subject: [PATCH] add objectManager::error_exit() and use it in application::display() --- include/application.php | 2 +- include/objectManager.php | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/application.php b/include/application.php index 386fd74..2e5291d 100644 --- a/include/application.php +++ b/include/application.php @@ -692,7 +692,7 @@ class Application { { /* is this user supposed to view this version? */ if(!$_SESSION['current']->canViewApplication($this)) - util_show_error_page_and_exit("Something went wrong with the application or version id"); + objectManager::error_exit("You do not have permission to view this entry"); // cat display $oCategory = new Category($this->iCatId); diff --git a/include/objectManager.php b/include/objectManager.php index c9ae56f..9350891 100644 --- a/include/objectManager.php +++ b/include/objectManager.php @@ -147,6 +147,13 @@ class ObjectManager return TRUE; } + public static function error_exit($shMessage) + { + echo '

'.$shMessage.'