X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUndelete.php;h=5d230c069760800c1d57d198a7c3c24c6fd4dd3f;hb=5cbada9dea3f22e7bb33250197b156e8628b8e4a;hp=81ec4cc6a947767f3fdfcc617c56849da8d74893;hpb=fb7b3eebeb8de47eb42e8d6ccf204106a2d6d9e4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index 81ec4cc6a9..5d230c0697 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -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 ] ); @@ -695,6 +698,10 @@ class SpecialUndelete extends SpecialPage { parent::__construct( 'Undelete', 'deletedhistory' ); } + public function doesWrites() { + return true; + } + function loadRequest( $par ) { $request = $this->getRequest(); $user = $this->getUser(); @@ -865,7 +872,7 @@ class SpecialUndelete extends SpecialPage { "ids" => $revisions, "target" => $this->mTargetObj->getPrefixedText() ]; - $url = SpecialPage::getTitleFor( "RevisionDelete" )->getFullURL( $query ); + $url = SpecialPage::getTitleFor( 'Revisiondelete' )->getFullURL( $query ); $this->getOutput()->redirect( $url ); }