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/includes | |
| 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/includes')
| -rw-r--r-- | phpBB/includes/functions_posting.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 6e62c0c6e4..ce1238d8e0 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -2166,6 +2166,11 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u update_forum_tracking_info($data['forum_id'], $forum_last_post_time, $f_mark_time, false); } + // If a username was supplied or the poster is a guest, we will use the supplied username. + // Doing it this way we can use "...post by guest-username..." in notifications when + // "guest-username" is supplied or ommit the username if it is not. + $username = ($username !== '' || !$user->data['is_registered']) ? $username : $user->data['username']; + // Send Notifications $notification_data = array_merge($data, array( 'topic_title' => (isset($data['topic_title'])) ? $data['topic_title'] : $subject, |
