summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cd5cb51)
raw | patch | inline | side by side (parent: cd5cb51)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 19 Mar 2007 12:35:13 +0000 (12:35 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 19 Mar 2007 12:35:13 +0000 (12:35 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5821 594d385d-05f5-0310-b6e9-bd551577e9d8
include/functions.inc | patch | blob | history |
diff --git a/include/functions.inc b/include/functions.inc
index 62ef01a1edf71db442e37ef64aa69f8f848f51b2..5b35af77fd159449d3be46b205c1a74021d48411 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
return (preg_match('/^4/', phpversion()));
}
+/* Add "str_split" if this function is missing.
+ * This function is only available in PHP5
+ */
+ if(!function_exists("str_split")){
+ function str_split($str,$length =1)
+ {
+ if($length < 1 ) $length =1;
+
+ $ret = array();
+ for($i = 0 ; $i < strlen($str); $i = $i +$length){
+ $ret[] = substr($str,$i ,$length);
+ }
+ return($ret);
+ }
+ }
+
+
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>