From ecf56c33fae16e8a7a8f7ab56e7b6aba3720ceeb Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 4 Sep 2010 03:43:33 +0000 Subject: [PATCH] Braces and spaces --- includes/Html.php | 22 +++++++++++++--------- includes/WatchlistEditor.php | 27 ++++++++++++++++++--------- includes/WebRequest.php | 25 ++++++++++++++++++------- includes/WikiMap.php | 9 ++++++--- includes/Xml.php | 21 +++++++++++++++------ includes/ZhClient.php | 16 ++++++++++------ 6 files changed, 80 insertions(+), 40 deletions(-) diff --git a/includes/Html.php b/includes/Html.php index f3884899ef..20d7ef5459 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -571,10 +571,12 @@ class Html { global $wgHtml5; $attribs['name'] = $name; if ( !$wgHtml5 ) { - if ( !isset( $attribs['cols'] ) ) + if ( !isset( $attribs['cols'] ) ) { $attribs['cols'] = ""; - if ( !isset( $attribs['rows'] ) ) + } + if ( !isset( $attribs['rows'] ) ) { $attribs['rows'] = ""; + } } return self::element( 'textarea', $attribs, $value ); } @@ -610,7 +612,9 @@ class Html { } } $html = Html::openElement( 'html', $attribs ); - if ( $html ) $html .= "\n"; + if ( $html ) { + $html .= "\n"; + } $ret .= $html; return $ret; } @@ -623,12 +627,12 @@ class Html { */ public static function isXmlMimeType( $mimetype ) { switch ( $mimetype ) { - case 'text/xml': - case 'application/xhtml+xml': - case 'application/xml': - return true; - default: - return false; + case 'text/xml': + case 'application/xhtml+xml': + case 'application/xml': + return true; + default: + return false; } } } diff --git a/includes/WatchlistEditor.php b/includes/WatchlistEditor.php index 1f10a85d74..0e5a59ef52 100644 --- a/includes/WatchlistEditor.php +++ b/includes/WatchlistEditor.php @@ -100,15 +100,17 @@ class WatchlistEditor { $titles = array(); if( !is_array( $list ) ) { $list = explode( "\n", trim( $list ) ); - if( !is_array( $list ) ) + if( !is_array( $list ) ) { return array(); + } } foreach( $list as $text ) { $text = trim( $text ); if( strlen( $text ) > 0 ) { $title = Title::newFromText( $text ); - if( $title instanceof Title && $title->isWatchable() ) + if( $title instanceof Title && $title->isWatchable() ) { $titles[] = $title->getPrefixedText(); + } } } return array_unique( $titles ); @@ -129,8 +131,9 @@ class WatchlistEditor { // Do a batch existence check $batch = new LinkBatch(); foreach( $titles as $title ) { - if( !$title instanceof Title ) + if( !$title instanceof Title ) { $title = Title::newFromText( $title ); + } if( $title instanceof Title ) { $batch->addObj( $title ); $batch->addObj( $title->getTalkPage() ); @@ -140,8 +143,9 @@ class WatchlistEditor { // Print out the list $output->addHTML( "