Merge "Add a 'revdelete-selected-file' message on Special:RevisionDelete"
[lhc/web/wiklou.git] / includes / specials / SpecialRevisiondelete.php
index 7abc253..ff287a1 100644 (file)
@@ -142,6 +142,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                $this->token = $request->getVal( 'token' );
                if ( $this->archiveName && $this->targetObj ) {
                        $this->tryShowFile( $this->archiveName );
+
                        return;
                }
 
@@ -161,6 +162,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                # We need a target page!
                if ( is_null( $this->targetObj ) ) {
                        $output->addWikiMsg( 'undelete-header' );
+
                        return;
                }
                # Give a link to the logs/hist for this page
@@ -262,6 +264,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                $conds['log_action'] = $this->getList()->getLogAction();
                $conds['ls_field'] = RevisionDeleter::getRelationType( $this->typeName );
                $conds['ls_value'] = $this->ids;
+
                return $conds;
        }
 
@@ -276,6 +279,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                // Check if user is allowed to see this file
                if ( !$oimage->exists() ) {
                        $this->getOutput()->addWikiMsg( 'revdelete-no-file' );
+
                        return;
                }
                $user = $this->getUser();
@@ -305,6 +309,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                                Xml::submitButton( $this->msg( 'revdelete-show-file-submit' )->text() ) .
                                '</form>'
                        );
+
                        return;
                }
                $this->getOutput()->disable();
@@ -330,6 +335,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                                $this->typeName, $this->getContext(), $this->targetObj, $this->ids
                        );
                }
+
                return $this->list;
        }
 
@@ -468,8 +474,8 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                                $line = Xml::tags( 'td', array( 'class' => 'mw-input' ), $innerHTML );
                                $html .= "<tr>$line</tr>\n";
                        }
-               // Otherwise, use tri-state radios
                } else {
+                       // Otherwise, use tri-state radios
                        $html .= '<tr>';
                        $html .= '<th class="mw-revdel-checkbox">' . $this->msg( 'revdelete-radio-same' )->escaped() . '</th>';
                        $html .= '<th class="mw-revdel-checkbox">' . $this->msg( 'revdelete-radio-unset' )->escaped() . '</th>';
@@ -496,6 +502,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                }
 
                $html .= '</table>';
+
                return $html;
        }
 
@@ -509,6 +516,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                $token = $this->getRequest()->getVal( 'wpEditToken' );
                if ( $this->submitClicked && !$this->getUser()->matchEditToken( $token ) ) {
                        $this->getOutput()->addWikiMsg( 'sessionfailure' );
+
                        return false;
                }
                $bitParams = $this->extractBitParams();
@@ -528,11 +536,13 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                $status = $this->save( $bitParams, $comment, $this->targetObj );
                if ( $status->isGood() ) {
                        $this->success();
+
                        return true;
-               # ...otherwise, bounce back to form...
                } else {
+                       # ...otherwise, bounce back to form...
                        $this->failure( $status );
                }
+
                return false;
        }
 
@@ -574,6 +584,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                if ( !isset( $bitfield[Revision::DELETED_RESTRICTED] ) ) {
                        $bitfield[Revision::DELETED_RESTRICTED] = 0;
                }
+
                return $bitfield;
        }