Merge "Change "COMMIT ENQUEUED" warnings to level INFO"
[lhc/web/wiklou.git] / includes / specials / SpecialUndelete.php
index 81ec4cc..52a3d17 100644 (file)
@@ -360,11 +360,13 @@ class PageArchive {
         * @param array $fileVersions
         * @param bool $unsuppress
         * @param User $user User performing the action, or null to use $wgUser
+        * @param string|string[] $tags Change tags to add to log entry
+        *   ($user should be able to add the specified tags before this is called)
         * @return array(number of file revisions restored, number of image revisions
         *   restored, log message) on success, false on failure.
         */
        function undelete( $timestamps, $comment = '', $fileVersions = [],
-               $unsuppress = false, User $user = null
+               $unsuppress = false, User $user = null, $tags = null
        ) {
                // If both the set of text revisions and file revisions are empty,
                // restore everything. Otherwise, just restore the requested items.
@@ -426,6 +428,7 @@ class PageArchive {
                $logEntry->setPerformer( $user );
                $logEntry->setTarget( $this->title );
                $logEntry->setComment( $reason );
+               $logEntry->setTags( $tags );
 
                Hooks::run( 'ArticleUndeleteLogEntry', [ $this, &$logEntry, $user ] );