Display user when restoring articles
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@
|
||||
"onPageContentInsertComplete": "$1 created new page $2",
|
||||
"onTitleMoveComplete": "$1 moved page $2 to $3",
|
||||
"onArticleDeleteComplete": "$1 deleted page $2",
|
||||
"onArticleUndelete": "Deleted page $1 restored",
|
||||
"onArticleUndelete": "$1 restored page $1",
|
||||
"onArticleProtectComplete": "$1 changed protection of page $2",
|
||||
"onUploadComplete": "$1 uploaded file $2",
|
||||
"onUploadComplete_NewVersion": "$1 uploaded new version of file $2",
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user