From e27f805bff1ca27dab8495b58cac962be8e534f8 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 15 Jul 2009 22:48:50 +0000 Subject: [PATCH] 2nd followup to r53286, indentation fixes. --- includes/specials/SpecialAllmessages.php | 99 ++++++++++++------------ 1 file changed, 50 insertions(+), 49 deletions(-) diff --git a/includes/specials/SpecialAllmessages.php b/includes/specials/SpecialAllmessages.php index 9a09d07de2..06474b4839 100644 --- a/includes/specials/SpecialAllmessages.php +++ b/includes/specials/SpecialAllmessages.php @@ -39,10 +39,10 @@ class SpecialAllmessages extends SpecialPage { $this->langCode = $this->table->lang->getCode(); $wgOut->addHTML( $this->buildForm() . - $this->table->getNavigationBar() . - $this->table->getLimitForm() . - $this->table->getBody() . - $this->table->getNavigationBar() ); + $this->table->getNavigationBar() . + $this->table->getLimitForm() . + $this->table->getBody() . + $this->table->getNavigationBar() ); } @@ -55,35 +55,35 @@ class SpecialAllmessages extends SpecialPage { Xml::hidden( 'title', $this->getTitle() ) . Xml::element( 'legend', null, wfMsg( 'allmessages' ) ) . "\n" . "\n\n\n\n\n\n\n\n\n\n
" . - Xml::label( wfMsg('allmessages-prefix'), 'am-form-prefix' ) . - "" . - Xml::input( 'prefix', 20, str_replace('_',' ',$this->prefix), array( 'id' => 'am-form-prefix' ) ) . - "" . + Xml::label( wfMsg('allmessages-prefix'), 'am-form-prefix' ) . + "" . + Xml::input( 'prefix', 20, str_replace('_',' ',$this->prefix), array( 'id' => 'am-form-prefix' ) ) . + "" . "
" . - Xml::label( wfMsg('allmessages-filter'), 'am-form-filter' ) . - "" . - Xml::radioLabel( wfMsg('allmessages-filter-unmodified'), - 'filter', - 'unmodified', - 'am-form-filter-unmodified', - ( $this->filter == 'unmodified' ? true : false ) - ) . - Xml::radioLabel( wfMsg('allmessages-filter-all'), - 'filter', - 'all', - 'am-form-filter-all', - ( $this->filter == 'all' ? true : false ) - ) . - Xml::radioLabel( wfMsg('allmessages-filter-modified'), - 'filter', - 'modified', - 'am-form-filter-modified', - ( $this->filter == 'modified' ? true : false ) - ) . + Xml::label( wfMsg('allmessages-filter'), 'am-form-filter' ) . + "" . + Xml::radioLabel( wfMsg('allmessages-filter-unmodified'), + 'filter', + 'unmodified', + 'am-form-filter-unmodified', + ( $this->filter == 'unmodified' ? true : false ) + ) . + Xml::radioLabel( wfMsg('allmessages-filter-all'), + 'filter', + 'all', + 'am-form-filter-all', + ( $this->filter == 'all' ? true : false ) + ) . + Xml::radioLabel( wfMsg('allmessages-filter-modified'), + 'filter', + 'modified', + 'am-form-filter-modified', + ( $this->filter == 'modified' ? true : false ) + ) . "
" . - Xml::label( wfMsg('yourlanguage'), 'am-form-lang' ) . - "" . - Xml::openElement( 'select', array( 'id' => 'am-form-lang', 'name' => 'lang' ) ); + Xml::label( wfMsg('yourlanguage'), 'am-form-lang' ) . + "" . + Xml::openElement( 'select', array( 'id' => 'am-form-lang', 'name' => 'lang' ) ); foreach( $languages as $lang => $name ) { $selected = $lang == $this->langCode ? 'selected="selected"' : ''; $out .= "\n"; @@ -188,11 +188,11 @@ class AllmessagesTablePager extends TablePager { $dbr = wfGetDB( DB_SLAVE ); $res = $dbr->select( 'page', - array( 'page_namespace', 'page_title' ), - array( 'page_namespace' => array(NS_MEDIAWIKI,NS_MEDIAWIKI_TALK) ), - __METHOD__, - array( 'USE INDEX' => 'name_title' ) - ); + array( 'page_namespace', 'page_title' ), + array( 'page_namespace' => array(NS_MEDIAWIKI,NS_MEDIAWIKI_TALK) ), + __METHOD__, + array( 'USE INDEX' => 'name_title' ) + ); while( $s = $dbr->fetchObject( $res ) ) { if( $s->page_namespace == NS_MEDIAWIKI ){ @@ -200,7 +200,7 @@ class AllmessagesTablePager extends TablePager { $title = explode( '/', $s->page_title ); if( $this->langcode == $title[1] && array_key_exists( $title[0], $this->messages ) ){ $this->messages["{$title[0]}"]['customised'] = 1; - } + } } else if( array_key_exists( $s->page_title , $this->messages ) ){ $this->messages[$s->page_title]['customised'] = 1; } @@ -227,14 +227,15 @@ class AllmessagesTablePager extends TablePager { $count = 0; foreach( $this->messages as $key => $value ){ if( $value['customised'] !== $this->custom && - ( $descending && ( $key < $offset || !$offset ) || !$descending && $key > $offset ) && + ( $descending && ( $key < $offset || !$offset ) || !$descending && $key > $offset ) && (( $this->prefix && preg_match( $this->prefix, $key ) ) || $this->prefix === false ) - ){ - $mResult->result[] = array( 'am_title' => $key, - 'am_actual' => $value['actual'], - 'am_default' => $value['default'], - 'am_customised' => $value['customised'], - ); + ){ + $mResult->result[] = array( + 'am_title' => $key, + 'am_actual' => $value['actual'], + 'am_default' => $value['default'], + 'am_customised' => $value['customised'], + ); unset( $this->messages[$key] ); // save a few bytes $count++; } @@ -246,8 +247,8 @@ class AllmessagesTablePager extends TablePager { function getStartBody() { return "\n" . - "\n\n"; + "\n\n"; } function formatValue( $field , $value ){ @@ -299,7 +300,7 @@ class AllmessagesTablePager extends TablePager { $formatted = ' '; } $s .= Xml::tags( 'td', $this->getCellAttrs( 'am_actual', $row->am_actual ), $formatted ) - . "\n"; + . "\n"; } return $s; } @@ -326,8 +327,8 @@ class AllmessagesTablePager extends TablePager { // This is not actually used, as getStartBody is overridden above function getFieldNames() { - return array( 'am_title' => wfMsg('allmessagesname'), - 'am_default' => wfMsg('allmessagesdefault') ); + return array( 'am_title' => wfMsg('allmessagesname'), + 'am_default' => wfMsg('allmessagesdefault') ); } function getTitle() { return SpecialPage::getTitleFor( 'Allmessages', false ); -- 2.20.1
" . wfMsg('allmessagesname') . "" . wfMsg('allmessagesdefault') . - "
" . wfMsg('allmessagescurrent') . "
" . wfMsg('allmessagesname') . "" . wfMsg('allmessagesdefault') . + "
" . wfMsg('allmessagescurrent') . "