Remove unnecessary exit calls after redirect() and util_show_error_page() calls
This commit is contained in:
@@ -519,10 +519,7 @@ class Application {
|
||||
|
||||
/* is this user supposed to view this version? */
|
||||
if(!$_SESSION['current']->canViewApplication($this))
|
||||
{
|
||||
util_show_error_page("Something went wrong with the application or version id");
|
||||
exit;
|
||||
}
|
||||
|
||||
// show Vote Menu
|
||||
if($_SESSION['current']->isLoggedIn())
|
||||
|
||||
@@ -12,6 +12,7 @@ function util_show_error_page($text = null, $message = null)
|
||||
echo "<div align=center><font color=red><b>$text</b></font></div>\n";
|
||||
echo "<p>$message</p>\n";
|
||||
apidb_footer();
|
||||
exit;
|
||||
}
|
||||
|
||||
function makeSafe($var)
|
||||
|
||||
@@ -622,25 +622,17 @@ class Version {
|
||||
|
||||
/* is this user supposed to view this version? */
|
||||
if(!$_SESSION['current']->canViewVersion($this))
|
||||
{
|
||||
util_show_error_page("Something went wrong with the application or version id");
|
||||
exit;
|
||||
}
|
||||
|
||||
$oApp = new Application($this->iAppId);
|
||||
if(!$oApp->iAppId)
|
||||
{
|
||||
// Oops! application not found or other error. do something
|
||||
util_show_error_page('Internal Database Access Error. No App found.');
|
||||
exit;
|
||||
}
|
||||
|
||||
// Oops! application not found or other error. do something
|
||||
if(!$oApp->iAppId)
|
||||
util_show_error_page('Internal Database Access Error. No App found.');
|
||||
|
||||
// Oops! Version not found or other error. do something
|
||||
if(!$this->iVersionId)
|
||||
{
|
||||
// Oops! Version not found or other error. do something
|
||||
util_show_error_page('Internal Database Access Error. No Version Found.');
|
||||
exit;
|
||||
}
|
||||
|
||||
// header
|
||||
apidb_header("Viewing App- ".$oApp->sName." Version - ".$this->sName);
|
||||
|
||||
@@ -151,10 +151,7 @@ function vote_menu()
|
||||
function vote_update($vars)
|
||||
{
|
||||
if(!$_SESSION['current']->isLoggedIn())
|
||||
{
|
||||
util_show_error_page("You must be logged in to vote");
|
||||
return;
|
||||
}
|
||||
|
||||
if( !is_numeric($vars['iAppId']) OR !is_numeric($vars['iSlot']))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user