From 738d4cc7f4161eab7bc0b847849f8d204f41dc8c Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 28 Dec 2004 17:56:33 +0000 Subject: - register process partly rewritten git-svn-id: http://piwigo.org/svn/trunk@661 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions.inc.php | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'include/functions.inc.php') diff --git a/include/functions.inc.php b/include/functions.inc.php index adbbce358..bb3979ae9 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -85,6 +85,31 @@ function get_boolean( $string ) return $boolean; } +/** + * returns boolean string 'true' or 'false' if the given var is boolean + * + * @param mixed $var + * @return mixed + */ +function boolean_to_string($var) +{ + if (is_bool($var)) + { + if ($var) + { + return 'true'; + } + else + { + return 'false'; + } + } + else + { + return $var; + } +} + // array_remove removes a value from the given array if the value existed in // this array. function array_remove( $array, $value ) @@ -512,7 +537,7 @@ function redirect( $url ) // $refresh, $url_link and $title are required for creating an automated // refresh page in header.tpl - $refresh = 1; + $refresh = 2; $url_link = $url; $title = 'redirection'; include( PHPWG_ROOT_PATH.'include/page_header.php' ); -- cgit v1.2.3