mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
changed email validation, special characters do not need to be escaped within character class (added ampersand to email validation too) git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3525 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
06a38909e6
commit
fa16e21fd4
8 changed files with 40 additions and 36 deletions
|
@ -200,7 +200,7 @@ function auth($type, $forum_id, $userdata, $f_access = '')
|
|||
{
|
||||
case AUTH_ALL:
|
||||
$auth_user[$key] = TRUE;
|
||||
$auth_user[$key . '_type'] = $lang['Auth_Anonymous_users'];
|
||||
$auth_user[$key . '_type'] = $lang['Auth_Anonymous_Users'];
|
||||
break;
|
||||
|
||||
case AUTH_REG:
|
||||
|
@ -239,7 +239,7 @@ function auth($type, $forum_id, $userdata, $f_access = '')
|
|||
{
|
||||
case AUTH_ALL:
|
||||
$auth_user[$f_forum_id][$key] = TRUE;
|
||||
$auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Anonymous_users'];
|
||||
$auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Anonymous_Users'];
|
||||
break;
|
||||
|
||||
case AUTH_REG:
|
||||
|
|
|
@ -748,8 +748,12 @@ function smilies_pass($message)
|
|||
}
|
||||
$smilies = $db->sql_fetchrowset($result);
|
||||
|
||||
if (count($smilies))
|
||||
{
|
||||
usort($smilies, 'smiley_sort');
|
||||
for($i = 0; $i < count($smilies); $i++)
|
||||
}
|
||||
|
||||
for ($i = 0; $i < count($smilies); $i++)
|
||||
{
|
||||
$orig[] = "/(?<=.\W|\W.|^\W)" . phpbb_preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/";
|
||||
$repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['smile_url'] . '" border="0" />';
|
||||
|
@ -761,6 +765,7 @@ function smilies_pass($message)
|
|||
$message = preg_replace($orig, $repl, ' ' . $message . ' ');
|
||||
$message = substr($message, 1, -1);
|
||||
}
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
||||
|
@ -774,5 +779,4 @@ function smiley_sort($a, $b)
|
|||
return ( strlen($a['code']) > strlen($b['code']) ) ? -1 : 1;
|
||||
}
|
||||
|
||||
|
||||
?>
|
|
@ -117,7 +117,7 @@ function validate_email($email)
|
|||
|
||||
if ($email != '')
|
||||
{
|
||||
if (preg_match('/^[a-z0-9\.\-_\+]+@[a-z0-9\-_]+\.([a-z0-9\-_]+\.)*?[a-z]+$/is', $email))
|
||||
if (preg_match('/^[a-z0-9&.-_+]+@[a-z0-9\-_]+\.([a-z0-9\-_]+\.)*?[a-z]+$/is', $email))
|
||||
{
|
||||
$sql = "SELECT ban_email
|
||||
FROM " . BANLIST_TABLE;
|
||||
|
|
|
@ -99,7 +99,7 @@ function page_common_form($hidden, $submit)
|
|||
|
||||
?>
|
||||
<tr>
|
||||
<td class="catbottom" align="center" colspan="2"><?php echo $hidden; ?><input class="mainoption" type="submit" value="<?php echo $submit; ?>" /></td>
|
||||
<td class="catBottom" align="center" colspan="2"><?php echo $hidden; ?><input class="mainoption" type="submit" value="<?php echo $submit; ?>" /></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
|
@ -111,10 +111,10 @@ function page_upgrade_form()
|
|||
|
||||
?>
|
||||
<tr>
|
||||
<td class="catbottom" align="center" colspan="2"><?php echo $lang['continue_upgrade']; ?></td>
|
||||
<td class="catBottom" align="center" colspan="2"><?php echo $lang['continue_upgrade']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="catbottom" align="center" colspan="2"><input type="submit" name="upgrade_now" value="<?php echo $lang['upgrade_submit']; ?>" /></td>
|
||||
<td class="catBottom" align="center" colspan="2"><input type="submit" name="upgrade_now" value="<?php echo $lang['upgrade_submit']; ?>" /></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
|
|
|
@ -1146,7 +1146,7 @@ switch( $mode )
|
|||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'PAGINATION' => generate_pagination("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id", $forum_topics, $board_config['topics_per_page'], $start),
|
||||
'PAGINATION' => generate_pagination("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'], $forum_topics, $board_config['topics_per_page'], $start),
|
||||
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $forum_topics / $board_config['topics_per_page'] )),
|
||||
'L_GOTO_PAGE' => $lang['Goto_page'])
|
||||
);
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
<th class="thHead" align="center">{L_USER_SELECT}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="center"><input class="post" type="text" class="post" name="username" maxlength="50" size="20" /> <input type="hidden" name="mode" value="edit" />{S_HIDDEN_FIELDS}<input type="submit" name="submituser" value="{L_LOOK_UP}" class="mainoption" /> <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></td>
|
||||
<td class="row1" align="center"><input type="text" class="post" name="username" maxlength="50" size="20" /> <input type="hidden" name="mode" value="edit" />{S_HIDDEN_FIELDS}<input type="submit" name="submituser" value="{L_LOOK_UP}" class="mainoption" /> <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></td>
|
||||
</tr>
|
||||
</table></form>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
</tr>
|
||||
<!-- END memberrow -->
|
||||
<tr>
|
||||
<td class="catbottom" colspan="8" height="28"> </td>
|
||||
<td class="catBottom" colspan="8" height="28"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
|
||||
|
|
|
@ -615,7 +615,7 @@ if ( $can_watch_topic )
|
|||
// If we've got a hightlight set pass it on to pagination,
|
||||
// I get annoyed when I lose my highlight after the first page.
|
||||
//
|
||||
$pagination = ( $highlight_active ) ? generate_pagination("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order&highlight=$highlight", $total_replies, $board_config['posts_per_page'], $start) : generate_pagination("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order", $total_replies, $board_config['posts_per_page'], $start);
|
||||
$pagination = ( $highlight != '' ) ? generate_pagination("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order&highlight=$highlight", $total_replies, $board_config['posts_per_page'], $start) : generate_pagination("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order", $total_replies, $board_config['posts_per_page'], $start);
|
||||
|
||||
//
|
||||
// Send vars to template
|
||||
|
|
Loading…
Add table
Reference in a new issue