aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2004-12-28 17:56:33 +0000
committerplegall <plg@piwigo.org>2004-12-28 17:56:33 +0000
commit738d4cc7f4161eab7bc0b847849f8d204f41dc8c (patch)
tree011ab2cd31367d3caa9dbce70ce3fed7ba759dcb /include/functions.inc.php
parent4f11be1410a3289ac4cc37f688c491b077ddc83f (diff)
- register process partly rewritten
git-svn-id: http://piwigo.org/svn/trunk@661 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions.inc.php')
-rw-r--r--include/functions.inc.php27
1 files changed, 26 insertions, 1 deletions
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' );