Rename util_show_error_page() to util_show_error_page_and_exit() and redirect() to util_redirect_and_exit()
so it is explicit that we exit in those functions that so we know it isn't necessary to put an exit after we call them
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* display an error page
|
||||
*/
|
||||
function util_show_error_page($text = null, $message = null)
|
||||
function util_show_error_page_and_exit($text = null, $message = null)
|
||||
{
|
||||
if (!$text) {
|
||||
$text = "You must be logged in to perform that operation.";
|
||||
@@ -15,6 +15,15 @@ function util_show_error_page($text = null, $message = null)
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* redirect to $url
|
||||
*/
|
||||
function util_redirect_and_exit($url)
|
||||
{
|
||||
header("Location: ".$url);
|
||||
exit;
|
||||
}
|
||||
|
||||
function makeSafe($var)
|
||||
{
|
||||
/* Disable addslashes() until we can use more finely grained filtering on user input */
|
||||
|
||||
Reference in New Issue
Block a user