From 343420d0adbb86eb4e5007b0baeaae5165ef5c32 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sat, 21 Apr 2007 14:44:56 +0000 Subject: [PATCH] Convert whitespaces to tabulations --- includes/AjaxDispatcher.php | 5 +- includes/AjaxFunctions.php | 72 ++++++++++++++--------------- includes/EditPage.php | 18 ++++---- includes/ImageQueryPage.php | 11 +++-- includes/Revision.php | 4 +- includes/SearchEngine.php | 4 +- includes/Skin.php | 2 +- includes/SpecialDeadendpages.php | 10 ++-- includes/SpecialFewestrevisions.php | 16 +++---- includes/SpecialListusers.php | 18 ++++---- includes/SpecialLongpages.php | 9 ++-- includes/SpecialPopularpages.php | 6 +-- includes/SpecialUndelete.php | 2 +- 13 files changed, 89 insertions(+), 88 deletions(-) diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php index 570931c87b..90f68ecb31 100644 --- a/includes/AjaxDispatcher.php +++ b/includes/AjaxDispatcher.php @@ -1,7 +1,8 @@ getPrevious() : null; } - + #Sanity check, make sure it's the right page. # Otherwise, $text will be left as-is. if ( !is_null($undorev) && !is_null($oldrev) && $undorev->getPage()==$oldrev->getPage() && $undorev->getPage()==$this->mArticle->getID() ) { $undorev_text = $undorev->getText(); - $oldrev_text = $oldrev->getText(); - $currev_text = $text; + $oldrev_text = $oldrev->getText(); + $currev_text = $text; #No use doing a merge if it's just a straight revert. if ( $currev_text != $undorev_text ) { @@ -294,7 +294,7 @@ class EditPage { global $wgOut, $wgUser, $wgRequest, $wgTitle; global $wgEmailConfirmToEdit; - if ( ! wfRunHooks( 'AlternateEdit', array( &$this ) ) ) + if ( ! wfRunHooks( 'AlternateEdit', array( &$this ) ) ) return; $fname = 'EditPage::edit'; @@ -813,7 +813,7 @@ class EditPage { } #And a similar thing for new sections - if( $this->section == 'new' && !$this->allowBlankSummary && $wgUser->getOption( 'forceeditsummary' ) ) { + if( $this->section == 'new' && !$this->allowBlankSummary && $wgUser->getOption( 'forceeditsummary' ) ) { if (trim($this->summary) == '') { $this->missingSummary = true; wfProfileOut( $fname ); @@ -881,7 +881,7 @@ class EditPage { $this->summary = ''; $this->textbox1 = $this->getContent(false); if ($this->textbox1 === false) return false; - + if ( !$this->mArticle->exists() && $this->mArticle->mTitle->getNamespace() == NS_MEDIAWIKI ) $this->textbox1 = wfMsgWeirdKey( $this->mArticle->mTitle->getText() ); wfProxyCheck(); @@ -947,9 +947,9 @@ class EditPage { $wgOut->addWikiText( wfMsg( 'missingsummary' ) ); } - if( $this->missingSummary && $this->section == 'new' ) { - $wgOut->addWikiText( wfMsg( 'missingcommentheader' ) ); - } + if( $this->missingSummary && $this->section == 'new' ) { + $wgOut->addWikiText( wfMsg( 'missingcommentheader' ) ); + } if( !$this->hookError == '' ) { $wgOut->addWikiText( $this->hookError ); diff --git a/includes/ImageQueryPage.php b/includes/ImageQueryPage.php index c49b487ed1..93f090a107 100644 --- a/includes/ImageQueryPage.php +++ b/includes/ImageQueryPage.php @@ -25,19 +25,20 @@ class ImageQueryPage extends QueryPage { if( $num > 0 ) { $gallery = new ImageGallery(); $gallery->useSkin( $skin ); - + # $res might contain the whole 1,000 rows, so we read up to # $num [should update this to use a Pager] for( $i = 0; $i < $num && $row = $dbr->fetchObject( $res ); $i++ ) { $image = $this->prepareImage( $row ); - if( $image instanceof Image ) + if( $image instanceof Image ) { $gallery->add( $image, $this->getCellHtml( $row ) ); + } } - + $out->addHtml( $gallery->toHtml() ); } } - + /** * Prepare an image object given a result row * @@ -51,7 +52,7 @@ class ImageQueryPage extends QueryPage { ? new Image( $title ) : null; } - + /** * Get additional HTML to be shown in a results' cell * diff --git a/includes/Revision.php b/includes/Revision.php index 84debfaeda..71f214e3aa 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -10,8 +10,8 @@ class Revision { const DELETED_TEXT = 1; const DELETED_COMMENT = 2; const DELETED_USER = 4; - const DELETED_RESTRICTED = 8; - + const DELETED_RESTRICTED = 8; + /** * Load a page revision from a given revision ID number. * Returns null if no such revision can be found. diff --git a/includes/SearchEngine.php b/includes/SearchEngine.php index be04380102..24795ba9b9 100644 --- a/includes/SearchEngine.php +++ b/includes/SearchEngine.php @@ -244,9 +244,9 @@ class SearchEngine { * @param string $title * @abstract */ - function updateTitle( $id, $title ) { + function updateTitle( $id, $title ) { // no-op - } + } } diff --git a/includes/Skin.php b/includes/Skin.php index 83b54402c7..74a570c11d 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -431,7 +431,7 @@ var wgAjaxWatch = { wfProfileOut( __METHOD__ ); return $s; - } + } /** * Return html code that include User stylesheets diff --git a/includes/SpecialDeadendpages.php b/includes/SpecialDeadendpages.php index 0f8cbe5b4a..48d27addf9 100644 --- a/includes/SpecialDeadendpages.php +++ b/includes/SpecialDeadendpages.php @@ -36,7 +36,7 @@ class DeadendPagesPage extends PageQueryPage { return false; } - /** + /** * @return string an sqlquery */ function getSQL() { @@ -47,7 +47,7 @@ class DeadendPagesPage extends PageQueryPage { "WHERE pl_from IS NULL " . "AND page_namespace = 0 " . "AND page_is_redirect = 0"; - } + } } /** @@ -55,11 +55,11 @@ class DeadendPagesPage extends PageQueryPage { */ function wfSpecialDeadendpages() { - list( $limit, $offset ) = wfCheckLimits(); + list( $limit, $offset ) = wfCheckLimits(); - $depp = new DeadendPagesPage(); + $depp = new DeadendPagesPage(); - return $depp->doQuery( $offset, $limit ); + return $depp->doQuery( $offset, $limit ); } ?> diff --git a/includes/SpecialFewestrevisions.php b/includes/SpecialFewestrevisions.php index 849438f111..4c0cd686e5 100644 --- a/includes/SpecialFewestrevisions.php +++ b/includes/SpecialFewestrevisions.php @@ -1,22 +1,22 @@ tableNamesN( 'revision', 'page' ); - + return "SELECT 'Fewestrevisions' as type, page_namespace as namespace, page_title as title, @@ -35,9 +35,9 @@ class FewestrevisionsPage extends QueryPage { GROUP BY 1,2,3 HAVING COUNT(*) > 1"; } - + function sortDescending() { - return false; + return false; } function formatResult( $skin, $result ) { diff --git a/includes/SpecialListusers.php b/includes/SpecialListusers.php index 39ac0003d3..42498430c7 100644 --- a/includes/SpecialListusers.php +++ b/includes/SpecialListusers.php @@ -76,14 +76,14 @@ class UsersPager extends AlphabeticPager { 'MAX(ug_group) AS singlegroup'), 'options' => array('GROUP BY' => 'user_name'), 'conds' => $conds - ); - + ); + } function formatRow( $row ) { $userPage = Title::makeTitle( NS_USER, $row->user_name ); $name = $this->getSkin()->makeLinkObj( $userPage, htmlspecialchars( $userPage->getText() ) ); - + if( $row->numgroups > 1 || ( $this->requestedGroup && $row->numgroups == 1 ) ) { $list = array(); foreach( self::getGroups( $row->user_id ) as $group ) @@ -94,7 +94,7 @@ class UsersPager extends AlphabeticPager { } else { $groups = ''; } - + return '
  • ' . wfSpecialList( $name, $groups ) . '
  • '; } @@ -164,7 +164,7 @@ class UsersPager extends AlphabeticPager { $query['username'] = $this->requestedUser; return $query; } - + /** * Get a list of groups the specified user belongs to * @@ -181,8 +181,8 @@ class UsersPager extends AlphabeticPager { $dbr->freeResult( $res ); } return $groups; - } - + } + /** * Format a link to a group description page * @@ -195,7 +195,6 @@ class UsersPager extends AlphabeticPager { $cache[$group] = User::makeGroupLinkHtml( $group, User::getGroupMember( $group ) ); return $cache[$group]; } - } /** @@ -221,7 +220,8 @@ function wfSpecialListusers( $par = null ) { } else { $s .= '

    ' . wfMsgHTML('listusers-noresult') . '

    '; }; - $wgOut->addHTML( $s ); + + $wgOut->addHTML( $s ); } ?> diff --git a/includes/SpecialLongpages.php b/includes/SpecialLongpages.php index af9daa7abf..406598890f 100644 --- a/includes/SpecialLongpages.php +++ b/includes/SpecialLongpages.php @@ -22,13 +22,12 @@ class LongPagesPage extends ShortPagesPage { /** * constructor */ -function wfSpecialLongpages() -{ - list( $limit, $offset ) = wfCheckLimits(); +function wfSpecialLongpages() { + list( $limit, $offset ) = wfCheckLimits(); - $lpp = new LongPagesPage(); + $lpp = new LongPagesPage(); - $lpp->doQuery( $offset, $limit ); + $lpp->doQuery( $offset, $limit ); } ?> diff --git a/includes/SpecialPopularpages.php b/includes/SpecialPopularpages.php index d5d6aeea12..cd2f60e751 100644 --- a/includes/SpecialPopularpages.php +++ b/includes/SpecialPopularpages.php @@ -59,11 +59,11 @@ class PopularPagesPage extends QueryPage { * Constructor */ function wfSpecialPopularpages() { - list( $limit, $offset ) = wfCheckLimits(); + list( $limit, $offset ) = wfCheckLimits(); - $ppp = new PopularPagesPage(); + $ppp = new PopularPagesPage(); - return $ppp->doQuery( $offset, $limit ); + return $ppp->doQuery( $offset, $limit ); } ?> diff --git a/includes/SpecialUndelete.php b/includes/SpecialUndelete.php index bd99caf4ad..5b9225ec3f 100644 --- a/includes/SpecialUndelete.php +++ b/includes/SpecialUndelete.php @@ -11,7 +11,7 @@ * Constructor */ function wfSpecialUndelete( $par ) { - global $wgRequest; + global $wgRequest; $form = new UndeleteForm( $wgRequest, $par ); $form->execute(); -- 2.20.1