1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Move phpbb_preg_quote back into functions because it's plain annoying ... :D

git-svn-id: file:///svn/phpbb/trunk@2427 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen
2002-03-25 12:41:41 +00:00
parent 5b176a2eff
commit 70889081f1
2 changed files with 13 additions and 18 deletions

View File

@@ -422,6 +422,18 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add
return $page_string;
}
//
// This does exactly what preg_quote() does in PHP 4-ish
// If you just need the 1-parameter preg_quote call, then don't bother using this.
//
function phpbb_preg_quote($str, $delimiter)
{
$text = preg_quote($str);
$text = str_replace($delimiter, "\\" . $delimiter, $text);
return $text;
}
//
// Obtain list of naughty words and build preg style replacement arrays for use by the
// calling script, note that the vars are passed as references this just makes it easier