Merge "Fix edit link for messages in $wgForceUIMsgAsContentMsg"
[lhc/web/wiklou.git] / includes / specials / SpecialRevisiondelete.php
index e0a964e..21867b5 100644 (file)
@@ -132,18 +132,8 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                // $this->ids = array_map( 'intval', $this->ids );
                $this->ids = array_unique( array_filter( $this->ids ) );
 
-               if ( $request->getVal( 'action' ) == 'historysubmit'
-                       || $request->getVal( 'action' ) == 'revisiondelete'
-               ) {
-                       // For show/hide form submission from history page
-                       // Since we are access through index.php?title=XXX&action=historysubmit
-                       // getFullTitle() will contain the target title and not our title
-                       $this->targetObj = $this->getFullTitle();
-                       $this->typeName = 'revision';
-               } else {
-                       $this->typeName = $request->getVal( 'type' );
-                       $this->targetObj = Title::newFromText( $request->getText( 'target' ) );
-               }
+               $this->typeName = $request->getVal( 'type' );
+               $this->targetObj = Title::newFromText( $request->getText( 'target' ) );
 
                # For reviewing deleted files...
                $this->archiveName = $request->getVal( 'file' );
@@ -378,7 +368,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                $out->wrapWikiMsg( "<strong>$1</strong>", array( $this->typeLabels['selected'],
                        $this->getLanguage()->formatNum( count( $this->ids ) ), $this->targetObj->getPrefixedText() ) );
 
-               $out->addHelpLink( 'Help:RevisionDelete' );
+               $this->addHelpLink( 'Help:RevisionDelete' );
                $out->addHTML( "<ul>" );
 
                $numRevisions = 0;
@@ -460,9 +450,8 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                                Xml::closeElement( 'form' ) . "\n";
                        // Show link to edit the dropdown reasons
                        if ( $this->getUser()->isAllowed( 'editinterface' ) ) {
-                               $title = Title::makeTitle( NS_MEDIAWIKI, 'Revdelete-reason-dropdown' );
                                $link = Linker::link(
-                                       $title,
+                                       $this->msg( 'revdelete-reason-dropdown' )->inContentLanguage()->getTitle(),
                                        $this->msg( 'revdelete-edit-reasonlist' )->escaped(),
                                        array(),
                                        array( 'action' => 'edit' )
@@ -616,7 +605,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                // Messages: revdelete-success, logdelete-success
                $this->getOutput()->setPageTitle( $this->msg( 'actioncomplete' ) );
                $this->getOutput()->wrapWikiMsg(
-                       "<span class=\"success\">\n$1\n</span>",
+                       "<div class=\"successbox\">\n$1\n</div>",
                        $this->typeLabels['success']
                );
                $this->wasSaved = true;
@@ -631,7 +620,10 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
        protected function failure( $status ) {
                // Messages: revdelete-failure, logdelete-failure
                $this->getOutput()->setPageTitle( $this->msg( 'actionfailed' ) );
-               $this->getOutput()->addWikiText( $status->getWikiText( $this->typeLabels['failure'] ) );
+               $this->getOutput()->addWikiText( '<div class="errorbox">' .
+                       $status->getWikiText( $this->typeLabels['failure'] ) .
+                       '</div>'
+               );
                $this->showForm();
        }