Fixed reply w/ quote link (functionality still dosan't exist for it though)

Fixed bug with being able to modifiy someone elses profile
Fixed bug with BBCode not working
Fixed bug with validate_username causing editing of profile to fail (only checks if you actually change you name now)


git-svn-id: file:///svn/phpbb/trunk@421 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
James Atkinson 2001-06-03 23:10:07 +00:00
parent bfa2136438
commit 10fa55f5a0
5 changed files with 110 additions and 104 deletions

View file

@ -122,7 +122,6 @@ else
$board_config['avatar_filesize'] = $config['avatar_filesize'];
$board_config['avatar_path'] = $config['avatar_path'];
}
include('language/lang_'.$board_config['default_lang'].'.'.$phpEx);
?>

View file

@ -149,6 +149,7 @@ $lang['Post_new_in'] = "Post New Topic in:"; // Followed by forum name
//
$lang['Website'] = "Website";
$lang['From'] = "From";
$lang['Wrong_Profile'] = "You cannot modify a profile that is not your own.";
//
// Memberslist

View file

@ -147,9 +147,9 @@ $error = FALSE;
//
// Set initial conditions
//
$disable_html = (isset($HTTP_POST_VARS['disable_html'])) ? $HTTP_POST_VARS['disable_html'] : !$userdata['user_allowhtml'];
$disable_bbcode = (isset($HTTP_POST_VARS['disable_bbcode'])) ? $HTTP_POST_VARS['disable_bbcode'] : !$userdata['user_allowbbcode'];
$disable_smilies = (isset($HTTP_POST_VARS['disable_smile'])) ? $HTTP_POST_VARS['disable_smile'] : !$userdata['user_allowsmile'];
$disable_html = (isset($HTTP_POST_VARS['disable_html'])) ? $HTTP_POST_VARS['disable_html'] : $userdata['user_allowhtml'];
$disable_bbcode = (isset($HTTP_POST_VARS['disable_bbcode'])) ? $HTTP_POST_VARS['disable_bbcode'] : $userdata['user_allowbbcode'];
$disable_smilies = (isset($HTTP_POST_VARS['disable_smile'])) ? $HTTP_POST_VARS['disable_smile'] : $userdata['user_allowsmile'];
$attach_sig = (isset($HTTP_POST_VARS['attach_sig'])) ? $HTTP_POST_VARS['attach_sig'] : $userdata['user_attachsig'];
$notify = (isset($HTTP_POST_VARS['notify'])) ? $HTTP_POST_VARS['notify'] : $userdata["always_notify"];

View file

@ -410,6 +410,12 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']))
$error = FALSE;
$passwd_sql = "";
if($user_id != $userdata['user_id'])
{
$error = TRUE;
$error_msg = $lang['Wrong_Profile'];
}
if(!empty($password) && !empty($password_confirm))
{
// The user wants to change their password, isn't that cute..
@ -432,7 +438,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']))
if($board_config['allow_namechange'])
{
if(!validate_username($username))
if(!validate_username($username) && ($username != $userdata['username']))
{
$error = TRUE;
if(isset($error_msg))

View file

@ -427,7 +427,7 @@ for($x = 0; $x < $total_posts; $x++)
$yim_img = ($postrow[$x]['user_yim']) ? "<a href=\"http://edit.yahoo.com/config/send_webmesg?.target=".$postrow[$x]['user_yim']."&.src=pg\"><img src=\"".$images['yim']."\" border=\"0\"></a>" : "";
$edit_img = "<a href=\"".append_sid("posting.$phpEx?mode=editpost&".POST_POST_URL."=".$postrow[$x]['post_id']."&".POST_TOPIC_URL."=$topic_id&".POST_FORUM_URL."=$forum_id")."\"><img src=\"".$images['edit']."\" alt=\"$l_editdelete\" border=\"0\"></a>";
$quote_img = "<a href=\"".append_sid("posting.$phpEx?mode=reply&quote=true&post_id=".$postrow[$x]['post_id']."&topic_id=$topic_id&forum_id=$forum_id")."\"><img src=\"".$images['quote']."\" alt=\"$l_replyquote\" border=\"0\"></a>";
$quote_img = "<a href=\"".append_sid("posting.$phpEx?mode=reply&quote=true&".POST_POST_URL."=".$postrow[$x]['post_id']."&".POST_TOPIC_URL."=$topic_id&".POST_FORUM_URL."=$forum_id")."\"><img src=\"".$images['quote']."\" alt=\"$l_replyquote\" border=\"0\"></a>";
$pmsg_img = "<a href=\"".append_sid("priv_msgs.$phpEx?mode=send")."\"><img src=\"".$images['pmsg']."\" alt=\"$l_sendpmsg\" border=\"0\"></a>";
if($is_auth['auth_mod'])