|
From: Paul S. O. <ps...@us...> - 2002-03-25 12:41:44
|
Update of /cvsroot/phpbb/phpBB2/includes In directory usw-pr-cvs1:/tmp/cvs-serv13066/includes Modified Files: bbcode.php functions.php Log Message: Move phpbb_preg_quote back into functions because it's plain annoying ... :D Index: bbcode.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/bbcode.php,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** bbcode.php 18 Mar 2002 17:46:43 -0000 1.35 --- bbcode.php 25 Mar 2002 12:41:41 -0000 1.36 *************** *** 765,785 **** } - // - // this does exactly what preg_quote() does in PHP 4-ish: - // http://www.php.net/manual/en/function.preg-quote.php - // - // This function is here because the 2nd paramter to preg_quote was added in some - // version of php 4.0.x.. So we use this in order to maintain compatibility with - // earlier versions of PHP. - // - // 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; - } ! ?> --- 765,768 ---- } ! ?> \ No newline at end of file Index: functions.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/functions.php,v retrieving revision 1.130 retrieving revision 1.131 diff -C2 -r1.130 -r1.131 *** functions.php 25 Mar 2002 12:39:17 -0000 1.130 --- functions.php 25 Mar 2002 12:41:41 -0000 1.131 *************** *** 424,427 **** --- 424,439 ---- // + // 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 |