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:
Jonathan Ernst
2006-07-06 18:44:56 +00:00
committed by WineHQ
parent a34058b924
commit 3096e63828
41 changed files with 119 additions and 120 deletions

View File

@@ -18,13 +18,13 @@ function filter_gpc()
if(is_numeric($_REQUEST[$aKeys[$i]]))
$aClean[$aKeys[$i]] = $_REQUEST[$aKeys[$i]];
else
util_show_error_page("Fatal error: ".$aKeys[$i]." should be a numeric value.");
util_show_error_page_and_exit("Fatal error: ".$aKeys[$i]." should be a numeric value.");
break;
case "b": // boolean
if($_REQUEST[$aKeys[$i]]=="true" || $_REQUEST[$aKeys[$i]]=="false")
$aClean[$aKeys[$i]] = $_REQUEST[$aKeys[$i]];
else
util_show_error_page("Fatal error: ".$aKeys[$i]." should be a boolean value.");
util_show_error_page_and_exit("Fatal error: ".$aKeys[$i]." should be a boolean value.");
break;
case "s": // string
switch($aKeys[$i][1])
@@ -39,11 +39,11 @@ function filter_gpc()
break;
case "a": // array
if(!is_array($_REQUEST[$aKeys[$i]]))
util_show_error_page("Fatal error: ".$aKeys[$i]." should be an array.");
util_show_error_page_and_exit("Fatal error: ".$aKeys[$i]." should be an array.");
break;
default:
if($aKeys[$i]!="whq_appdb" && $aKeys[$i]!="MAX_FILE_SIZE") // whq_appdb is the name of the session cookie
util_show_error_page("Fatal error: type of variable ".$aKeys[$i]." is not recognized.");
util_show_error_page_and_exit("Fatal error: type of variable ".$aKeys[$i]." is not recognized.");
break;
}
}