mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-01 21:27:55 +02:00
Stop using a couple of the php3 compatability wrappers since the
functions they replace are present in the current minimum required php version. There should be no noticable change from this apart from a slight performance increase, but again please report any issues with this change to me git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@5261 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
646c9b5428
commit
ebf7035201
@ -85,7 +85,6 @@ p,ul,td {font-size:10pt;}
|
||||
<li>[Fix] incorrect handling of move stubs (Bug #179)</li>
|
||||
<li>[Fix] wrong mode_type in memberlist (Bug #187)</li>
|
||||
<li>[Fix] removed unused variable from topic_notify email template (Bug #210)</li>
|
||||
<li>[Fix] invalid HTML in overall_header.tpl when user is logged in (Bug #211)</li>
|
||||
<li>[Fix] removed unset variable from smilies popup window title (Bug #224)</li>
|
||||
<li>[Fix] removed duplicate template assignment from admin_board.php (Bug #226)</li>
|
||||
<li>[Fix] incorrect search link for guest posts in modcp.php (Bug #254)</li>
|
||||
@ -95,6 +94,8 @@ p,ul,td {font-size:10pt;}
|
||||
<li>[Fix] fixed "var-by-ref" errors (Bug #322)</li>
|
||||
<li>[Fix] changed redirection to installation (Bug #325)</li>
|
||||
<li>[Fix] added timout of 10 seconds to version check (Bug #348)</li>
|
||||
<li>[Fix] multiple minor HTML issues with subSilver</li>
|
||||
<li>[Change] Deprecated the use of some PHP 3 compatability functions in favour of the native equivalents</li>
|
||||
|
||||
<a name="2016"></a><h3 class="h3">l.ii. Changes since 2.0.16</h3>
|
||||
|
||||
|
@ -432,7 +432,7 @@ function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_tag_
|
||||
// We have an opening tag.
|
||||
// Push its position, the text we matched, and its index in the open_tag array on to the stack, and then keep going to the right.
|
||||
$match = array("pos" => $curr_pos, "tag" => $which_start_tag, "index" => $start_tag_index);
|
||||
bbcode_array_push($stack, $match);
|
||||
array_push($stack, $match);
|
||||
//
|
||||
// Rather than just increment $curr_pos
|
||||
// Set it to the ending of the tag we just found
|
||||
@ -454,7 +454,7 @@ function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_tag_
|
||||
// There exists a starting tag.
|
||||
$curr_nesting_depth = sizeof($stack);
|
||||
// We need to do 2 replacements now.
|
||||
$match = bbcode_array_pop($stack);
|
||||
$match = array_pop($stack);
|
||||
$start_index = $match['pos'];
|
||||
$start_tag = $match['tag'];
|
||||
$start_length = strlen($start_tag);
|
||||
@ -520,7 +520,7 @@ function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_tag_
|
||||
// otherwise, we go back to the start.
|
||||
if (sizeof($stack) > 0)
|
||||
{
|
||||
$match = bbcode_array_pop($stack);
|
||||
$match = array_pop($stack);
|
||||
$curr_pos = $match['pos'];
|
||||
// bbcode_array_push($stack, $match);
|
||||
// ++$curr_pos;
|
||||
@ -700,6 +700,7 @@ function escape_slashes($input)
|
||||
* This function does exactly what the PHP4 function array_push() does
|
||||
* however, to keep phpBB compatable with PHP 3 we had to come up with our own
|
||||
* method of doing it.
|
||||
* This function was deprecated in phpBB 2.0.18
|
||||
*/
|
||||
function bbcode_array_push(&$stack, $value)
|
||||
{
|
||||
@ -711,6 +712,7 @@ function bbcode_array_push(&$stack, $value)
|
||||
* This function does exactly what the PHP4 function array_pop() does
|
||||
* however, to keep phpBB compatable with PHP 3 we had to come up with our own
|
||||
* method of doing it.
|
||||
* This function was deprecated in phpBB 2.0.18
|
||||
*/
|
||||
function bbcode_array_pop(&$stack)
|
||||
{
|
||||
@ -761,7 +763,7 @@ function smilies_pass($message)
|
||||
|
||||
for ($i = 0; $i < count($smilies); $i++)
|
||||
{
|
||||
$orig[] = "/(?<=.\W|\W.|^\W)" . phpbb_preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/";
|
||||
$orig[] = "/(?<=.\W|\W.|^\W)" . preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/";
|
||||
$repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['emoticon'] . '" border="0" />';
|
||||
}
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ class emailer
|
||||
if (preg_match('#^(Subject:(.*?))$#m', $this->msg, $match))
|
||||
{
|
||||
$this->subject = (trim($match[2]) != '') ? trim($match[2]) : (($this->subject != '') ? $this->subject : 'No Subject');
|
||||
$drop_header .= '[\r\n]*?' . phpbb_preg_quote($match[1], '#');
|
||||
$drop_header .= '[\r\n]*?' . preg_quote($match[1], '#');
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -174,7 +174,7 @@ class emailer
|
||||
if (preg_match('#^(Charset:(.*?))$#m', $this->msg, $match))
|
||||
{
|
||||
$this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim($lang['ENCODING']);
|
||||
$drop_header .= '[\r\n]*?' . phpbb_preg_quote($match[1], '#');
|
||||
$drop_header .= '[\r\n]*?' . preg_quote($match[1], '#');
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -261,7 +261,7 @@ class emailer
|
||||
$str = chunk_split(base64_encode($str), $length, $spacer);
|
||||
|
||||
// remove trailing spacer and add start and end delimiters
|
||||
$str = preg_replace('#' . phpbb_preg_quote($spacer, '#') . '$#', '', $str);
|
||||
$str = preg_replace('#' . preg_quote($spacer, '#') . '$#', '', $str);
|
||||
|
||||
return $start . $str . $end;
|
||||
}
|
||||
|
@ -539,7 +539,7 @@ function obtain_word_list(&$orig_word, &$replacement_word)
|
||||
{
|
||||
do
|
||||
{
|
||||
$orig_word[] = '#\b(' . str_replace('\*', '\w*?', phpbb_preg_quote($row['word'], '#')) . ')\b#i';
|
||||
$orig_word[] = '#\b(' . str_replace('\*', '\w*?', preg_quote($row['word'], '#')) . ')\b#i';
|
||||
$replacement_word[] = $row['replacement'];
|
||||
}
|
||||
while ( $row = $db->sql_fetchrow($result) );
|
||||
|
@ -70,7 +70,7 @@ function validate_username($username)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (preg_match("#\b(" . str_replace("\*", ".*?", phpbb_preg_quote($row['disallow_username'], '#')) . ")\b#i", $username))
|
||||
if (preg_match("#\b(" . str_replace("\*", ".*?", preg_quote($row['disallow_username'], '#')) . ")\b#i", $username))
|
||||
{
|
||||
$db->sql_freeresult($result);
|
||||
return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
|
||||
@ -89,7 +89,7 @@ function validate_username($username)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (preg_match("#\b(" . str_replace("\*", ".*?", phpbb_preg_quote($row['word'], '#')) . ")\b#i", $username))
|
||||
if (preg_match("#\b(" . str_replace("\*", ".*?", preg_quote($row['word'], '#')) . ")\b#i", $username))
|
||||
{
|
||||
$db->sql_freeresult($result);
|
||||
return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
|
||||
|
@ -490,7 +490,7 @@ if (isset($HTTP_GET_VARS['highlight']))
|
||||
{
|
||||
if (trim($words[$i]) != '')
|
||||
{
|
||||
$highlight_match .= (($highlight_match != '') ? '|' : '') . str_replace('*', '\w*', phpbb_preg_quote($words[$i], '#'));
|
||||
$highlight_match .= (($highlight_match != '') ? '|' : '') . str_replace('*', '\w*', preg_quote($words[$i], '#'));
|
||||
}
|
||||
}
|
||||
unset($words);
|
||||
|
Loading…
x
Reference in New Issue
Block a user