add objectManager::error_exit() and use it in application::display()

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-10-24 17:54:13 +02:00
committed by Chris Morgan
parent b6f1f22192
commit fcd40be8a4
2 changed files with 8 additions and 1 deletions

View File

@@ -692,7 +692,7 @@ class Application {
{ {
/* is this user supposed to view this version? */ /* is this user supposed to view this version? */
if(!$_SESSION['current']->canViewApplication($this)) 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 // cat display
$oCategory = new Category($this->iCatId); $oCategory = new Category($this->iCatId);

View File

@@ -147,6 +147,13 @@ class ObjectManager
return TRUE; 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 */ /* displays the list of entries */
public function display_table($aClean) public function display_table($aClean)
{ {