diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2013-09-02 12:31:27 +0200 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2013-09-02 12:31:27 +0200 |
| commit | 5ddb0ba629e4b31ada931240c661d3f4c43d8676 (patch) | |
| tree | 647d6a6d642a96f991667dd3208cff479bb30ae4 /phpBB/posting.php | |
| parent | da373ea8a09c39e14fbb619963e7c15d50a11ae4 (diff) | |
| parent | 68555d2d513a6a8721777382a8cc8e4633e18cd3 (diff) | |
| download | forums-5ddb0ba629e4b31ada931240c661d3f4c43d8676.tar forums-5ddb0ba629e4b31ada931240c661d3f4c43d8676.tar.gz forums-5ddb0ba629e4b31ada931240c661d3f4c43d8676.tar.bz2 forums-5ddb0ba629e4b31ada931240c661d3f4c43d8676.tar.xz forums-5ddb0ba629e4b31ada931240c661d3f4c43d8676.zip | |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/11769] Allow using 0 as poster name
[ticket/11769] Allow '0' as username
[ticket/11769] Allow '0' as username in notification mails
[ticket/11769] Fix language issues in the doc blocks
[ticket/11769] Correctly supply the post author's username in posting.php
Conflicts:
phpBB/includes/functions_posting.php
Diffstat (limited to 'phpBB/posting.php')
| -rw-r--r-- | phpBB/posting.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index ac459197b3..8fe19b2c9f 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1152,8 +1152,14 @@ if ($submit || $preview || $refresh) $data['topic_posts_softdeleted'] = $post_data['topic_posts_softdeleted']; } + // Only return the username when it is either a guest posting or we are editing a post and + // the username was supplied; otherwise post_data might hold the data of the post that is + // being quoted (which could result in the username being returned being that of the quoted + // post's poster, not the poster of the current post). See: PHPBB3-11769 for more information. + $post_author_name = ((!$user->data['is_registered'] || $mode == 'edit') && $post_data['username'] !== '') ? $post_data['username'] : ''; + // The last parameter tells submit_post if search indexer has to be run - $redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message, ($update_message || $update_subject) ? true : false); + $redirect_url = submit_post($mode, $post_data['post_subject'], $post_author_name, $post_data['topic_type'], $poll, $data, $update_message, ($update_message || $update_subject) ? true : false); if ($config['enable_post_confirm'] && !$user->data['is_registered'] && (isset($captcha) && $captcha->is_solved() === true) && ($mode == 'post' || $mode == 'reply' || $mode == 'quote')) { |
