diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-11-21 19:27:40 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-11-21 19:27:40 +0100 |
commit | f707fec0001d7dc7d46be114c42b37e49a052660 (patch) | |
tree | 516038932bcbdcd0686643da9e93ec1fc2b213c0 /program/include/rcube_utils.php | |
parent | 5e1775691ce503521745f6380cadb7a295bd681d (diff) |
Create Roundcube Framework initialization script (bootstrap)
Diffstat (limited to 'program/include/rcube_utils.php')
-rw-r--r-- | program/include/rcube_utils.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/program/include/rcube_utils.php b/program/include/rcube_utils.php index 2b48e7c97..df77dfe42 100644 --- a/program/include/rcube_utils.php +++ b/program/include/rcube_utils.php @@ -958,4 +958,20 @@ class rcube_utils return $password; } } + + + /** + * Find out if the string content means true or false + * + * @param string $str Input value + * + * @return boolean Boolean value + */ + public static function get_boolean($str) + { + $str = strtolower($str); + + return !in_array($str, array('false', '0', 'no', 'off', 'nein', ''), true); + } + } |