Display user when restoring articles

This commit is contained in:
Jayden Bailey
2018-09-11 19:16:57 +01:00
parent 458dab64b1
commit 2b53dc2d28
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -202,16 +202,18 @@ final class MediawikiDiscordHooks
static function onArticleUndelete($title, $create, $comment)
{
global $wgUser;
if (MediawikiDiscord::isNotificationExcluded("onArticleUndelete"))
{
return;
}
$message = MediawikiDiscord::translate('onArticleUndelete', MediawikiDiscord::getTitleText($title));
$message = MediawikiDiscord::translate('onArticleUndelete', MediawikiDiscord::getUserText($wgUser), MediawikiDiscord::getTitleText($title));
if (empty($comment) == false)
{
$message .= sprintf(" `%s`",
$message .= sprintf(": `%s`",
$comment);
}