1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-08 17:56:52 +02:00

try to prevent re-parsing of parsed bbcode content

git-svn-id: file:///svn/phpbb/trunk@6043 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-06-10 20:16:02 +00:00
parent 4613de6f87
commit c102bec023
2 changed files with 122 additions and 45 deletions

View File

@@ -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
/**