aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-03-06 16:51:44 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-03-06 16:51:44 +0000
commit37d1d9277b985461509e74f646ddd3fe29248646 (patch)
treedcd6bc339f60a732d777395aca7d6ed5d64a704d
parent44fab300022812cb63e3270bdf4f575f1e4117ed (diff)
downloadforums-37d1d9277b985461509e74f646ddd3fe29248646.tar
forums-37d1d9277b985461509e74f646ddd3fe29248646.tar.gz
forums-37d1d9277b985461509e74f646ddd3fe29248646.tar.bz2
forums-37d1d9277b985461509e74f646ddd3fe29248646.tar.xz
forums-37d1d9277b985461509e74f646ddd3fe29248646.zip
fix guest posting/editing bugs
git-svn-id: file:///svn/phpbb/trunk@7138 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/posting.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index b772c7aa1d..e585b73e7d 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -708,7 +708,7 @@ if ($submit || $preview || $refresh)
{
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
- if (($result = validate_username($post_data['username'], $post_data['post_username'])) !== false)
+ if (($result = validate_username($post_data['username'], (!empty($post_data['post_username'])) ? $post_data['post_username'] : '')) !== false)
{
$user->add_lang('ucp');
$error[] = $user->lang[$result . '_USERNAME'];
@@ -1221,7 +1221,7 @@ $template->assign_vars(array(
'S_CLOSE_PROGRESS_WINDOW' => (isset($_POST['add_file'])) ? true : false,
'S_EDIT_POST' => ($mode == 'edit') ? true : false,
'S_EDIT_REASON' => ($mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? true : false,
- 'S_DISPLAY_USERNAME' => (!$user->data['is_registered'] || ($mode == 'edit' && $post_data['post_username'])) ? true : false,
+ 'S_DISPLAY_USERNAME' => (!$user->data['is_registered'] || ($mode == 'edit' && $post_data['poster_id'] == ANONYMOUS)) ? true : false,
'S_SHOW_TOPIC_ICONS' => $s_topic_icons,
'S_DELETE_ALLOWED' => ($mode == 'edit' && (($post_id == $post_data['topic_last_post_id'] && $post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id)) || $auth->acl_get('m_delete', $forum_id))) ? true : false,
'S_BBCODE_ALLOWED' => $bbcode_status,