1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 12:03:21 +01:00

Fixed preg single quote potential problem, altered jumpbox slightly

git-svn-id: file:///svn/phpbb/trunk@1136 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2001-10-06 17:21:10 +00:00
parent 12b93f8080
commit 2e1b7d42b1
2 changed files with 3 additions and 3 deletions

View File

@ -146,7 +146,7 @@ function make_jumpbox($match_forum_id = 0)
$total_forums = $db->sql_numrows($q_forums); $total_forums = $db->sql_numrows($q_forums);
$forum_rows = $db->sql_fetchrowset($q_forums); $forum_rows = $db->sql_fetchrowset($q_forums);
$boxstring = '<select name="' . POST_FORUM_URL . '"><option value="-1">' . $lang['Select_forum'] . '</option>'; $boxstring = '<select name="' . POST_FORUM_URL . '" onChange="if(this.options[this.selectedIndex].value != -1){ forms[\'jumpbox\'].submit() }"><option value="-1">' . $lang['Select_forum'] . '</option>';
for($i = 0; $i < $total_categories; $i++) for($i = 0; $i < $total_categories; $i++)
{ {
$boxstring .= '<option value="-1">&nbsp;</option>'; $boxstring .= '<option value="-1">&nbsp;</option>';
@ -830,7 +830,7 @@ function smilies_pass($message)
usort($smilies, 'smiley_sort'); usort($smilies, 'smiley_sort');
for($i = 0; $i < count($smilies); $i++) for($i = 0; $i < count($smilies); $i++)
{ {
$orig[] = "'(?<=.\\W|\\W.|^\\W)" . preg_quote($smilies[$i]['code']) . "(?=.\\W|\\W.|\\W$)'i"; $orig[] = "/(?<=.\\W|\\W.|^\\W)" . preg_quote($smilies[$i]['code']) . "(?=.\\W|\\W.|\\W$)/i";
$repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['smile_url'] . '" border="0">'; $repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['smile_url'] . '" border="0">';
} }

View File

@ -1,5 +1,5 @@
<form method="post" action="{S_JUMPBOX_ACTION}"> <form method="post" name="jumpbox" action="{S_JUMPBOX_ACTION}">
<table cellspacing="0" cellpadding="0" border="0"> <table cellspacing="0" cellpadding="0" border="0">
<tr> <tr>
<td nowrap="nowrap"><span class="gensmall">{L_JUMP_TO}:&nbsp;{S_JUMPBOX_LIST}&nbsp; <td nowrap="nowrap"><span class="gensmall">{L_JUMP_TO}:&nbsp;{S_JUMPBOX_LIST}&nbsp;