Alexander Nicolaysen Sørnes : add objectManager::error_exit() and use it in application::display()
Chris Morgan
cmorgan at winehq.org
Wed Oct 24 20:19:25 CDT 2007
Module: appdb
Branch: master
Commit: fcd40be8a488d13f71b3832b3a1de78e8c719cca
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=fcd40be8a488d13f71b3832b3a1de78e8c719cca
Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date: Wed Oct 24 17:54:13 2007 +0200
add objectManager::error_exit() and use it in application::display()
---
include/application.php | 2 +-
include/objectManager.php | 7 +++++++
2 files changed, 8 insertions(+), 1 deletions(-)
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 '<div align="center"><p><font color="red"><b>'.$shMessage.'</b></font></p></div';
+ echo apidb_footer();
+ exit;
+ }
+
/* displays the list of entries */
public function display_table($aClean)
{
More information about the wine-cvs
mailing list