Update formatting
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Thu, 14 Nov 2013 11:18:26 +0000 (12:18 +0100)
committerSiebrand Mazeland <s.mazeland@xs4all.nl>
Thu, 14 Nov 2013 11:20:43 +0000 (12:20 +0100)
Change-Id: I3cbe1f5e48730fbbe57e4b20a0c202edddc93c95

13 files changed:
includes/actions/CachedAction.php
includes/actions/CreditsAction.php
includes/actions/DeleteAction.php
includes/actions/EditAction.php
includes/actions/HistoryAction.php
includes/actions/InfoAction.php
includes/actions/MarkpatrolledAction.php
includes/actions/ProtectAction.php
includes/actions/RawAction.php
includes/actions/RenderAction.php
includes/actions/RevertAction.php
includes/actions/ViewAction.php
includes/actions/WatchAction.php

index bfdda7b..f3ce25b 100644 (file)
@@ -184,5 +184,4 @@ abstract class CachedAction extends FormlessAction implements ICacheHelper {
                        $this->getOutput()->setSubtitle( $this->cacheHelper->getCachedNotice( $this->getContext() ) );
                }
        }
-
 }
index 0a2bf30..cd7eb45 100644 (file)
@@ -74,6 +74,7 @@ class CreditsAction extends FormlessAction {
                }
 
                wfProfileOut( __METHOD__ );
+
                return $s;
        }
 
@@ -94,6 +95,7 @@ class CreditsAction extends FormlessAction {
                        $d = '';
                        $t = '';
                }
+
                return $this->msg( 'lastmodifiedatby', $d, $t )->rawParams(
                        $this->userLink( $user ) )->params( $user->getName() )->escaped();
        }
@@ -175,6 +177,7 @@ class CreditsAction extends FormlessAction {
                }
 
                $count = count( $fulllist );
+
                # "Based on work by ..."
                return $count
                        ? $this->msg( 'othercontribs' )->rawParams(
index db7123d..069d570 100644 (file)
@@ -43,7 +43,5 @@ class DeleteAction extends FormlessAction {
        public function show() {
 
                $this->page->delete();
-
        }
-
 }
index 3dd4c48..72210a9 100644 (file)
@@ -49,9 +49,7 @@ class EditAction extends FormlessAction {
                        $editor = new EditPage( $page );
                        $editor->edit();
                }
-
        }
-
 }
 
 /**
@@ -75,5 +73,4 @@ class SubmitAction extends EditAction {
 
                parent::show();
        }
-
 }
index e58791e..d9eba9c 100644 (file)
@@ -122,6 +122,7 @@ class HistoryAction extends FormlessAction {
                if ( $feedType ) {
                        $this->feed( $feedType );
                        wfProfileOut( __METHOD__ );
+
                        return;
                }
 
@@ -141,6 +142,7 @@ class HistoryAction extends FormlessAction {
                                )
                        );
                        wfProfileOut( __METHOD__ );
+
                        return;
                }
 
@@ -162,7 +164,7 @@ class HistoryAction extends FormlessAction {
                }
                if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {
                        $checkDeleted = Xml::checkLabel( $this->msg( 'history-show-deleted' )->text(),
-                       'deleted', 'mw-show-deleted-only', $request->getBool( 'deleted' ) ) . "\n";
+                               'deleted', 'mw-show-deleted-only', $request->getBool( 'deleted' ) ) . "\n";
                } else {
                        $checkDeleted = '';
                }
@@ -316,9 +318,10 @@ class HistoryAction extends FormlessAction {
                                $wgContLang->time( $rev->getTimestamp() ) )->inContentLanguage()->text();
                } else {
                        $title = $rev->getUserText() .
-                       $this->msg( 'colon-separator' )->inContentLanguage()->text() .
-                       FeedItem::stripComment( $rev->getComment() );
+                               $this->msg( 'colon-separator' )->inContentLanguage()->text() .
+                               FeedItem::stripComment( $rev->getComment() );
                }
+
                return new FeedItem(
                        $title,
                        $text,
@@ -383,6 +386,7 @@ class HistoryPager extends ReverseChronologicalPager {
                        $this->tagFilter
                );
                wfRunHooks( 'PageHistoryPager::getQueryInfo', array( &$this, &$queryInfo ) );
+
                return $queryInfo;
        }
 
@@ -401,6 +405,7 @@ class HistoryPager extends ReverseChronologicalPager {
                        $s = '';
                }
                $this->lastRow = $row;
+
                return $s;
        }
 
@@ -457,13 +462,15 @@ class HistoryPager extends ReverseChronologicalPager {
 
                $s .= $this->buttons;
                $s .= '<ul id="pagehistory">' . "\n";
+
                return $s;
        }
 
        private function getRevisionButton( $name, $msg ) {
                $this->preventClickjacking();
                # Note bug #20966, <button> is non-standard in IE<8
-               $element = Html::element( 'button',
+               $element = Html::element(
+                       'button',
                        array(
                                'type' => 'submit',
                                'name' => $name,
@@ -502,6 +509,7 @@ class HistoryPager extends ReverseChronologicalPager {
                        $s .= $this->buttons;
                }
                $s .= '</form>';
+
                return $s;
        }
 
@@ -534,8 +542,7 @@ class HistoryPager extends ReverseChronologicalPager {
         * @return String: HTML output for the row
         */
        function historyLine( $row, $next, $notificationtimestamp = false,
-               $latest = false, $firstInList = false )
-       {
+               $latest = false, $firstInList = false ) {
                $rev = new Revision( $row );
                $rev->setTitle( $this->getTitle() );
 
@@ -550,9 +557,9 @@ class HistoryPager extends ReverseChronologicalPager {
                $lastlink = $this->lastLink( $rev, $next );
                $diffButtons = $this->diffButtons( $rev, $firstInList );
                $histLinks = Html::rawElement(
-                               'span',
-                               array( 'class' => 'mw-history-histlinks' ),
-                               $this->msg( 'parentheses' )->rawParams( $curlink . $this->historyPage->message['pipe-separator'] . $lastlink )->escaped()
+                       'span',
+                       array( 'class' => 'mw-history-histlinks' ),
+                       $this->msg( 'parentheses' )->rawParams( $curlink . $this->historyPage->message['pipe-separator'] . $lastlink )->escaped()
                );
                $s = $histLinks . $diffButtons;
 
@@ -635,8 +642,8 @@ class HistoryPager extends ReverseChronologicalPager {
                        }
 
                        if ( !$rev->isDeleted( Revision::DELETED_TEXT )
-                               && !$prevRev->isDeleted( Revision::DELETED_TEXT ) )
-                       {
+                               && !$prevRev->isDeleted( Revision::DELETED_TEXT )
+                       {
                                # Create undo tooltip for the first (=latest) line only
                                $undoTooltip = $latest
                                        ? array( 'title' => $this->msg( 'tooltip-undo' )->text() )
@@ -705,6 +712,7 @@ class HistoryPager extends ReverseChronologicalPager {
                if ( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
                        $link = "<span class=\"history-deleted\">$link</span>";
                }
+
                return $link;
        }
 
@@ -758,8 +766,8 @@ class HistoryPager extends ReverseChronologicalPager {
                                )
                        );
                } elseif ( !$prevRev->userCan( Revision::DELETED_TEXT, $this->getUser() )
-                       || !$nextRev->userCan( Revision::DELETED_TEXT, $this->getUser() ) )
-               {
+                       || !$nextRev->userCan( Revision::DELETED_TEXT, $this->getUser() )
+               {
                        return $last;
                } else {
                        return Linker::linkKnown(
@@ -816,6 +824,7 @@ class HistoryPager extends ReverseChronologicalPager {
                                array_merge( $radio, $checkmark, array(
                                        'name' => 'diff',
                                        'id' => "mw-diff-$id" ) ) );
+
                        return $first . $second;
                } else {
                        return '';
index 701f6d4..c97267b 100644 (file)
@@ -153,6 +153,7 @@ class InfoAction extends FormlessAction {
         */
        protected function makeHeader( $header ) {
                $spanAttribs = array( 'class' => 'mw-headline', 'id' => Sanitizer::escapeId( $header ) );
+
                return Html::rawElement( 'h2', array(), Html::element( 'span', $spanAttribs, $header ) );
        }
 
@@ -306,7 +307,7 @@ class InfoAction extends FormlessAction {
                if (
                        $user->isAllowed( 'unwatchedpages' ) ||
                        ( $wgUnwatchedPageThreshold !== false &&
-                         $pageCounts['watchers'] >= $wgUnwatchedPageThreshold )
+                               $pageCounts['watchers'] >= $wgUnwatchedPageThreshold )
                ) {
                        // Number of page watchers
                        $pageInfo['header-basic'][] = array(
@@ -736,6 +737,7 @@ class InfoAction extends FormlessAction {
                );
 
                wfProfileOut( __METHOD__ );
+
                return $result;
        }
 
@@ -803,6 +805,7 @@ class InfoAction extends FormlessAction {
                }
 
                $count = count( $fulllist );
+
                # "Based on work by ..."
                return $count
                        ? $this->msg( 'othercontribs' )->rawParams(
index ff6cf13..4016f67 100644 (file)
@@ -70,6 +70,7 @@ class MarkpatrolledAction extends FormlessAction {
                        $this->getOutput()->setPageTitle( $this->msg( 'markedaspatrollederror' ) );
                        $this->getOutput()->addWikiMsg( 'markedaspatrollederror-noautopatrol' );
                        $this->getOutput()->returnToMain( null, $return );
+
                        return;
                }
 
index ec6648e..8b2bfaa 100644 (file)
@@ -43,9 +43,7 @@ class ProtectAction extends FormlessAction {
        public function show() {
 
                $this->page->protect();
-
        }
-
 }
 
 /**
@@ -64,7 +62,5 @@ class UnprotectAction extends ProtectAction {
        public function show() {
 
                $this->page->unprotect();
-
        }
-
 }
index 32751e4..1213bfb 100644 (file)
@@ -212,6 +212,7 @@ class RawAction extends FormlessAction {
                                $oldid = 0;
                                break;
                }
+
                return $oldid;
        }
 
@@ -273,6 +274,7 @@ class RawPage extends RawAction {
                if ( $this->mOldId !== null ) {
                        return $this->mOldId;
                }
+
                return parent::getOldId();
        }
 }
index 3d244fb..c9b3f8f 100644 (file)
@@ -43,7 +43,5 @@ class RenderAction extends FormlessAction {
        public function show() {
 
                $this->page->render();
-
        }
-
 }
index a5fc4e1..0a7ef9f 100644 (file)
@@ -38,7 +38,8 @@ class RevertAction extends Action {
                $this->getOutput()->showErrorPage( 'nosuchaction', 'nosuchactiontext' );
        }
 
-       public function execute() {}
+       public function execute() {
+       }
 }
 
 /**
@@ -63,8 +64,8 @@ class RevertFileAction extends FormAction {
                $oldimage = $this->getRequest()->getText( 'oldimage' );
                if ( strlen( $oldimage ) < 16
                        || strpos( $oldimage, '/' ) !== false
-                       || strpos( $oldimage, '\\' ) !== false )
-               {
+                       || strpos( $oldimage, '\\' ) !== false
+               {
                        throw new ErrorPageError( 'internalerror', 'unexpected', array( 'oldimage', $oldimage ) );
                }
 
@@ -114,6 +115,7 @@ class RevertFileAction extends FormAction {
        public function onSubmit( $data ) {
                $source = $this->page->getFile()->getArchiveVirtualUrl( $this->getRequest()->getText( 'oldimage' ) );
                $comment = $data['comment'];
+
                // TODO: Preserve file properties from database instead of reloading from file
                return $this->page->getFile()->upload( $source, $comment, $comment, 0, false, false, $this->getUser() );
        }
@@ -139,6 +141,7 @@ class RevertFileAction extends FormAction {
 
        protected function getDescription() {
                $this->getOutput()->addBacklinkSubtitle( $this->getTitle() );
+
                return '';
        }
 }
index e227197..3a24565 100644 (file)
@@ -43,5 +43,4 @@ class ViewAction extends FormlessAction {
        public function show() {
                $this->page->view();
        }
-
 }
index 929c1b5..054d615 100644 (file)
@@ -51,6 +51,7 @@ class WatchAction extends FormAction {
                wfProfileIn( __METHOD__ );
                self::doWatch( $this->getTitle(), $this->getUser() );
                wfProfileOut( __METHOD__ );
+
                return true;
        }
 
@@ -105,6 +106,7 @@ class WatchAction extends FormAction {
                                return self::doUnwatch( $title, $user );
                        }
                }
+
                return Status::newGood();
        }
 
@@ -129,6 +131,7 @@ class WatchAction extends FormAction {
                        $user->addWatch( $title, $checkRights );
                        wfRunHooks( 'WatchArticleComplete', array( &$user, &$page ) );
                }
+
                return $status;
        }
 
@@ -152,6 +155,7 @@ class WatchAction extends FormAction {
                        $user->removeWatch( $title );
                        wfRunHooks( 'UnwatchArticleComplete', array( &$user, &$page ) );
                }
+
                return $status;
        }
 
@@ -220,6 +224,7 @@ class UnwatchAction extends WatchAction {
                wfProfileIn( __METHOD__ );
                self::doUnwatch( $this->getTitle(), $this->getUser() );
                wfProfileOut( __METHOD__ );
+
                return true;
        }