1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-08 01:36:57 +02:00

Merge branch 'prep-release-3.0.12' into develop-olympus

* prep-release-3.0.12:
  [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/language/en/email/forum_notify.txt
	phpBB/language/en/email/newtopic_notify.txt
	phpBB/language/en/email/topic_notify.txt
This commit is contained in:
Andreas Fischer
2013-09-02 12:30:10 +02:00
5 changed files with 14 additions and 5 deletions

View File

@@ -2604,7 +2604,10 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
// Send Notifications
if (($mode == 'reply' || $mode == 'quote' || $mode == 'post') && $post_approval)
{
$username = ($username) ? $username : $user->data['username'];
// 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'];
user_notification($mode, $subject, $data['topic_title'], $data['forum_name'], $data['forum_id'], $data['topic_id'], $data['post_id'], $username);
}