diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-09-16 07:00:55 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-09-16 07:00:55 +0000 |
commit | b6fb59209de7e9f974ef86f29765ab97dd1ca63a (patch) | |
tree | 1e49dc06b413302dbee3bfe68a98c949d28f440e /lib/general.lib.php | |
parent | 16833b068e84ea37c18626f5163c17fe98090f14 (diff) | |
download | ampache-b6fb59209de7e9f974ef86f29765ab97dd1ca63a.tar.gz ampache-b6fb59209de7e9f974ef86f29765ab97dd1ca63a.tar.bz2 ampache-b6fb59209de7e9f974ef86f29765ab97dd1ca63a.zip |
fixed the played search problem, and added a limit, and operator designation
Diffstat (limited to 'lib/general.lib.php')
-rw-r--r-- | lib/general.lib.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/general.lib.php b/lib/general.lib.php index 3dbe6d23..aa8f27a9 100644 --- a/lib/general.lib.php +++ b/lib/general.lib.php @@ -809,4 +809,26 @@ function scrub_out($str) { } // scrub_out +/** + * make_bool + * This takes a value and returns what I consider to be the correct boolean value + * This is used instead of settype alone because settype considers 0 and "false" to + * be true + * @package General + */ +function make_bool($string) { + + if (strcasecmp($string,'false') == 0) { + return '0'; + } + + if ($string == '0') { + return '0'; + } + + return settype($string,"bool"); + +} // make_bool + + ?> |