aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorDavid King <imkingdavid@gmail.com>2013-09-02 09:14:19 -0700
committerDavid King <imkingdavid@gmail.com>2013-09-02 09:14:19 -0700
commit1b1dd01391337c4a13af012cbdae7f34aa9949ee (patch)
treea6b5b622be67a3d7ab29d886913643f39778525f /phpBB/includes/functions_posting.php
parent73859da481aa2be6b02e5b7f2825938aed82e858 (diff)
parent5ddb0ba629e4b31ada931240c661d3f4c43d8676 (diff)
downloadforums-1b1dd01391337c4a13af012cbdae7f34aa9949ee.tar
forums-1b1dd01391337c4a13af012cbdae7f34aa9949ee.tar.gz
forums-1b1dd01391337c4a13af012cbdae7f34aa9949ee.tar.bz2
forums-1b1dd01391337c4a13af012cbdae7f34aa9949ee.tar.xz
forums-1b1dd01391337c4a13af012cbdae7f34aa9949ee.zip
Merge remote-tracking branch 'upstream/develop' into ticket/11215
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php5
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,