diff --git a/account.php b/account.php index 4049d8a..a8a4d02 100644 --- a/account.php +++ b/account.php @@ -67,10 +67,10 @@ function do_account($sCmd = null) if($_SESSION['current']) $_SESSION['current']->logout(); - redirect(apidb_fullurl("index.php")); + util_redirect_and_exit(apidb_fullurl("index.php")); } // not valid command, display error page - util_show_error_page("Internal Error","This module was called with incorrect parameters"); + util_show_error_page_and_exit("Internal Error","This module was called with incorrect parameters"); } /** @@ -129,7 +129,7 @@ function cmd_do_new() $oUser->login($aClean['sUserEmail'], $aClean['sUserPassword']); addmsg("Account created! (".$aClean['sUserEmail'].")", "green"); - redirect(apidb_fullurl()); + util_redirect_and_exit(apidb_fullurl()); } else if($iResult == USER_CREATE_EXISTS) { @@ -162,7 +162,7 @@ function cmd_send_passwd() { addmsg("Please enter your email address in the 'E-mail' field and re-request a new password", "green"); - redirect(apidb_fullurl("account.php?cmd=login")); + util_redirect_and_exit(apidb_fullurl("account.php?cmd=login")); } $shNote = '(Note: accounts for appdb.winehq.org and bugs.winehq.org ' @@ -202,7 +202,7 @@ function cmd_send_passwd() .$shNote, "red"); } - redirect(apidb_fullurl("account.php?sCmd=login")); + util_redirect_and_exit(apidb_fullurl("account.php?sCmd=login")); } /** @@ -221,7 +221,7 @@ function cmd_do_login() if($iResult == SUCCESS) { addmsg("You are successfully logged in as '$oUser->sRealname'.", "green"); - redirect(apidb_fullurl("index.php")); + util_redirect_and_exit(apidb_fullurl("index.php")); } else { retry("login","Login failed ".$shNote); diff --git a/addcomment.php b/addcomment.php index df15476..0f82ccf 100644 --- a/addcomment.php +++ b/addcomment.php @@ -33,7 +33,7 @@ if(!$_SESSION['current']->isLoggedIn()) } if( !is_numeric($aClean['iVersionId']) ) - util_show_error_page('Internal Database Access Error'); + util_show_error_page_and_exit('Internal Database Access Error'); if(!is_numeric($aClean['iThread'])) { @@ -45,7 +45,7 @@ if(!empty($aClean['sBody'])) { $oComment = new Comment(); $oComment->create($aClean['sSubject'], $aClean['sBody'], $aClean['iThread'], $aClean['iVersionId']); - redirect(apidb_fullurl("appview.php?iVersionId=".$oComment->iVersionId)); + util_redirect_and_exit(apidb_fullurl("appview.php?iVersionId=".$oComment->iVersionId)); // let's show the comment form } else { diff --git a/admin/addAppNote.php b/admin/addAppNote.php index 2acd497..2265f65 100644 --- a/admin/addAppNote.php +++ b/admin/addAppNote.php @@ -26,7 +26,7 @@ if(!$_SESSION['current']->hasPriv("admin") && !$_SESSION['current']->isMaintainer($aClean['iVersionId']) && !$_SESSION['current']->isSuperMaintainer($aClean['iAppId'])) { - util_show_error_page("Insufficient Privileges!"); + util_show_error_page_and_exit("Insufficient Privileges!"); } //set link for version @@ -43,7 +43,7 @@ $oNote->GetOutputEditorValues(); if($aClean['sSub'] == "Submit") { $oNote->create(); - redirect(apidb_fullurl("appview.php?".$sVersionLink)); + util_redirect_and_exit(apidb_fullurl("appview.php?".$sVersionLink)); } else if($aClean['sSub'] == 'Preview' OR empty($aClean['sSubmit'])) { diff --git a/admin/addCategory.php b/admin/addCategory.php index a86a324..4d65e58 100644 --- a/admin/addCategory.php +++ b/admin/addCategory.php @@ -12,13 +12,13 @@ $aClean['iParentId'] = makeSafe($_REQUEST['iParentId']); $aClean['sSubmit'] = makeSafe($_REQUEST['sSubmit']); if(!$_SESSION['current']->hasPriv("admin")) - util_show_error_page(); + util_show_error_page_and_exit(); $oCat = new Category($aClean['iCatId']); if($aClean['sSubmit']) { $oCat->update($aClean['sName'],$aClean['sDescription'],$aClean['iParentId']); - redirect(apidb_fullurl("appbrowse.php?iCatId=".$oCat->iCatId)); + util_redirect_and_exit(apidb_fullurl("appbrowse.php?iCatId=".$oCat->iCatId)); } else { diff --git a/admin/adminAppDataQueue.php b/admin/adminAppDataQueue.php index e080b9e..3ea308c 100644 --- a/admin/adminAppDataQueue.php +++ b/admin/adminAppDataQueue.php @@ -20,7 +20,7 @@ $aClean['sReject'] = makeSafe($_REQUEST['sReject']); // deny access if not admin or at least some kind of maintainer if(!$_SESSION['current']->hasPriv("admin") && !$_SESSION['current']->isMaintainer()) - util_show_error_page("Insufficient privileges."); + util_show_error_page_and_exit("Insufficient privileges."); // shows the list of appdata in queue if (!$aClean['iId']) @@ -190,7 +190,7 @@ if (!$aClean['iId']) } } } - redirect(apidb_fullurl("admin/adminAppDataQueue.php")); + util_redirect_and_exit(apidb_fullurl("admin/adminAppDataQueue.php")); } elseif ($aClean['sReject']) { if($obj_row->type == "image") @@ -216,7 +216,7 @@ if (!$aClean['iId']) echo "
Application data was successfully deleted from the Queue.
\n"; } } - redirect(apidb_fullurl("admin/adminAppDataQueue.php")); + util_redirect_and_exit(apidb_fullurl("admin/adminAppDataQueue.php")); } } echo html_frame_end(" "); diff --git a/admin/adminAppQueue.php b/admin/adminAppQueue.php index 09ecd0f..c9f5125 100644 --- a/admin/adminAppQueue.php +++ b/admin/adminAppQueue.php @@ -132,7 +132,7 @@ function display_move_test_to_versions_table($aVersionsIds,$icurrentVersionId) //deny access if not logged in or not a super maintainer of any applications if(!$_SESSION['current']->hasPriv("admin") && !$_SESSION['current']->isSuperMaintainer()) - util_show_error_page("Insufficient privileges."); + util_show_error_page_and_exit("Insufficient privileges."); $oTest = new testData($aClean['iTestingId']); @@ -142,7 +142,7 @@ if ($aClean['sSub']) { /* make sure the user is authorized to view this application request */ if(!$_SESSION['current']->hasPriv("admin")) - util_show_error_page("Insufficient privileges."); + util_show_error_page_and_exit("Insufficient privileges."); $oApp = new Application($aClean['iAppId']); @@ -159,13 +159,13 @@ if ($aClean['sSub']) /* make sure the user has permission to view this version */ $oVersion = new Version($aClean['iVersionId']); if(!$_SESSION['current']->hasAppVersionModifyPermission($oVersion)) - util_show_error_page("Insufficient privileges."); + util_show_error_page_and_exit("Insufficient privileges."); } else { //error no Id! addmsg("Application Not Found!", "red"); - redirect(apidb_fullurl("admin/adminAppQueue.php")); + util_redirect_and_exit(apidb_fullurl("admin/adminAppQueue.php")); } // Get the Testing results if they exist @@ -205,7 +205,7 @@ if ($aClean['sSub']) $oVersion->unQueue(); $oTest->update(true); $oTest->unQueue(); - redirect($_SERVER['PHP_SELF']); + util_redirect_and_exit($_SERVER['PHP_SELF']); } else if ($aClean['sSub'] == 'duplicate') { @@ -222,7 +222,7 @@ if ($aClean['sSub']) } /* redirect back to the main page */ - redirect(apidb_fullurl("admin/adminAppQueue.php")); + util_redirect_and_exit(apidb_fullurl("admin/adminAppQueue.php")); } else if ($aClean['sSub'] == 'movetest') { @@ -239,7 +239,7 @@ if ($aClean['sSub']) } // redirect back to the main page - redirect(apidb_fullurl("admin/adminAppQueue.php")); + util_redirect_and_exit(apidb_fullurl("admin/adminAppQueue.php")); } else if ($aClean['sSub'] == 'Delete') { @@ -258,7 +258,7 @@ if ($aClean['sSub']) $oVersion->delete(); } - redirect(apidb_fullurl("admin/adminAppQueue.php")); + util_redirect_and_exit(apidb_fullurl("admin/adminAppQueue.php")); } else if ($aClean['sSub'] == 'Reject') { @@ -277,7 +277,7 @@ if ($aClean['sSub']) $oVersion->reject(); $oTest->update(true); $oTest->reject(); - redirect($_SERVER['PHP_SELF']); + util_redirect_and_exit($_SERVER['PHP_SELF']); } //process according to sub flag @@ -422,7 +422,7 @@ if ($aClean['sSub']) { //error no sub! addmsg("Internal Routine Not Found!!", "red"); - redirect(apidb_fullurl("admin/adminAppQueue.php")); + util_redirect_and_exit(apidb_fullurl("admin/adminAppQueue.php")); } } else /* if ($aClean['sSub']) is not defined, display the main app queue page */ diff --git a/admin/adminBugs.php b/admin/adminBugs.php index 69590fd..cbe8561 100644 --- a/admin/adminBugs.php +++ b/admin/adminBugs.php @@ -22,7 +22,7 @@ $aClean['iPage'] = makeSafe($_REQUEST['iPage']); // deny access if not logged in if(!$_SESSION['current']->hasPriv("admin")) - util_show_error_page("Insufficient privileges."); + util_show_error_page_and_exit("Insufficient privileges."); if ($aClean['sSub']) { @@ -36,7 +36,7 @@ if ($aClean['sSub']) $oBuglink = new bug($aClean['iBuglinkId']); $oBuglink->unqueue(); } - redirect($_SERVER['PHP_SELF']."?iItemsPerPage=".$aClean['iItemsPerPage']."&sQueuedOnly=".$aClean['sQueuedOnly']."&ipage=".$aClean['iPage']); + util_redirect_and_exit($_SERVER['PHP_SELF']."?iItemsPerPage=".$aClean['iItemsPerPage']."&sQueuedOnly=".$aClean['sQueuedOnly']."&ipage=".$aClean['iPage']); } { diff --git a/admin/adminMaintainerQueue.php b/admin/adminMaintainerQueue.php index 569daf3..75f1ee7 100644 --- a/admin/adminMaintainerQueue.php +++ b/admin/adminMaintainerQueue.php @@ -20,7 +20,7 @@ $aClean['sReject'] = makeSafe( $_REQUEST['sReject'] ); $aClean['sReplyText'] = makeSafe( $_REQUEST['sReplyText'] ); if(!$_SESSION['current']->hasPriv("admin")) - util_show_error_page("Insufficient privileges."); + util_show_error_page_and_exit("Insufficient privileges."); if ($aClean['sSub']) @@ -40,7 +40,7 @@ if ($aClean['sSub']) else { //error no Id! - util_show_error_page("QueueId Not Found!
"); + util_show_error_page_and_exit("QueueId Not Found!
"); } //process according to which request was submitted and optionally the sub flag diff --git a/admin/adminMaintainers.php b/admin/adminMaintainers.php index ff48c99..251f0fa 100644 --- a/admin/adminMaintainers.php +++ b/admin/adminMaintainers.php @@ -16,7 +16,7 @@ $aClean['iMaintainerId'] = makeSafe($_REQUEST['iMaintainerId']); // deny access if not logged in if(!$_SESSION['current']->hasPriv("admin")) - util_show_error_page("Insufficient privileges."); + util_show_error_page_and_exit("Insufficient privileges."); apidb_header("Admin Maintainers"); echo '