diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-06-10 20:16:02 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-06-10 20:16:02 +0000 |
commit | c102bec02311a093030b353d6ea8b8eed0a85885 (patch) | |
tree | 57070fbc95c00b878a0f81a3654c29d50300e14e /phpBB/includes/functions.php | |
parent | 4613de6f8746ce8ac4edd8e49f53c845394cff4f (diff) | |
download | forums-c102bec02311a093030b353d6ea8b8eed0a85885.tar forums-c102bec02311a093030b353d6ea8b8eed0a85885.tar.gz forums-c102bec02311a093030b353d6ea8b8eed0a85885.tar.bz2 forums-c102bec02311a093030b353d6ea8b8eed0a85885.tar.xz forums-c102bec02311a093030b353d6ea8b8eed0a85885.zip |
try to prevent re-parsing of parsed bbcode content
git-svn-id: file:///svn/phpbb/trunk@6043 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index bcf783090f..66903cc2c9 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -352,6 +352,30 @@ if (!function_exists('str_split')) } } +if (!function_exists('stripos')) +{ + /** + * A wrapper for the PHP5 function stripos + * Find position of first occurrence of a case-insensitive string + * + * @param string $haystack is the string to search in + * @param string needle is the string to search for + * + * @return Returns the numeric position of the first occurrence of needle in the haystack string. Unlike strpos(), stripos() is case-insensitive. + * Note that the needle may be a string of one or more characters. + * If needle is not found, stripos() will return boolean FALSE. + */ + function stripos($haystack, $needle) + { + if (preg_match('#' . preg_quote($needle, '#') . '#i', $haystack, $m)) + { + return strpos($haystack, $m[0]); + } + + return false; + } +} + // functions used for building option fields /** |