diff --git a/includes/Article.php b/includes/Article.php
index 9ab4b6baccc..76e566bd997 100644
--- a/includes/Article.php
+++ b/includes/Article.php
@@ -1764,8 +1764,9 @@ class Article extends Page {
wfDeprecated( __METHOD__, '1.18' );
if ( $noRedir ) {
$query = 'redirect=no';
- if ( $extraQuery )
+ if ( $extraQuery ) {
$query .= "&$extraQuery";
+ }
} else {
$query = $extraQuery;
}
diff --git a/includes/BacklinkCache.php b/includes/BacklinkCache.php
index 05bf31865c6..d2055dd5c55 100644
--- a/includes/BacklinkCache.php
+++ b/includes/BacklinkCache.php
@@ -287,8 +287,9 @@ class BacklinkCache {
default:
$conds = null;
wfRunHooks( 'BacklinkCacheGetConditions', array( $table, $this->title, &$conds ) );
- if( !$conds )
+ if( !$conds ) {
throw new MWException( "Invalid table \"$table\" in " . __CLASS__ );
+ }
}
return $conds;
diff --git a/includes/Cdb.php b/includes/Cdb.php
index ae2e5b18ae3..2a6a3d2d410 100644
--- a/includes/Cdb.php
+++ b/includes/Cdb.php
@@ -133,8 +133,9 @@ class CdbReader_DBA {
}
function close() {
- if( isset($this->handle) )
+ if( isset($this->handle) ) {
dba_close( $this->handle );
+ }
unset( $this->handle );
}
@@ -164,8 +165,9 @@ class CdbWriter_DBA {
}
function close() {
- if( isset($this->handle) )
+ if( isset($this->handle) ) {
dba_close( $this->handle );
+ }
if ( wfIsWindows() ) {
unlink( $this->realFileName );
}
diff --git a/includes/ChangeTags.php b/includes/ChangeTags.php
index 0ebc926fc93..a97cb034823 100644
--- a/includes/ChangeTags.php
+++ b/includes/ChangeTags.php
@@ -224,8 +224,9 @@ class ChangeTags {
public static function buildTagFilterSelector( $selected='', $fullForm = false, Title $title = null ) {
global $wgUseTagFilter;
- if ( !$wgUseTagFilter || !count( self::listDefinedTags() ) )
+ if ( !$wgUseTagFilter || !count( self::listDefinedTags() ) ) {
return $fullForm ? '' : array();
+ }
$data = array( Html::rawElement( 'label', array( 'for' => 'tagfilter' ), wfMessage( 'tag-filter' )->parse() ),
Xml::input( 'tagfilter', 20, $selected, array( 'class' => 'mw-tagfilter-input' ) ) );
diff --git a/includes/ChangesList.php b/includes/ChangesList.php
index 84677124eb7..e7395c02619 100644
--- a/includes/ChangesList.php
+++ b/includes/ChangesList.php
@@ -1058,8 +1058,9 @@ class EnhancedChangesList extends ChangesList {
array(),
$params
);
- if( $this->isDeleted($rcObj,Revision::DELETED_TEXT) )
+ if( $this->isDeleted( $rcObj, Revision::DELETED_TEXT ) ) {
$link = ''.$link.' ';
+ }
}
$r .= $link . '';
diff --git a/includes/EditPage.php b/includes/EditPage.php
index 84695b12f42..c1388246888 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -392,10 +392,14 @@ class EditPage {
wfProfileOut( __METHOD__ );
return;
}
- if ( !$this->mTitle->getArticleID() )
+
+ if ( !$this->mTitle->getArticleID() ) {
wfRunHooks( 'EditFormPreloadText', array( &$this->textbox1, &$this->mTitle ) );
- else
+ }
+ else {
wfRunHooks( 'EditFormInitialText', array( $this ) );
+ }
+
}
$this->showEditForm();
@@ -586,8 +590,10 @@ class EditPage {
// modified by subclasses
wfProfileIn( get_class( $this ) . "::importContentFormData" );
$textbox1 = $this->importContentFormData( $request );
- if ( isset( $textbox1 ) )
+ if ( isset( $textbox1 ) ) {
$this->textbox1 = $textbox1;
+ }
+
wfProfileOut( get_class( $this ) . "::importContentFormData" );
}
@@ -2014,10 +2020,13 @@ class EditPage {
$wgOut->wrapWikiMsg( "
\n$1\n
", array( 'userinvalidcssjstitle', $this->mTitle->getSkinFromCssJsSubpage() ) );
}
if ( $this->formtype !== 'preview' ) {
- if ( $this->isCssSubpage )
+ if ( $this->isCssSubpage ) {
$wgOut->wrapWikiMsg( "\n$1\n
", array( 'usercssyoucanpreview' ) );
- if ( $this->isJsSubpage )
+ }
+
+ if ( $this->isJsSubpage ) {
$wgOut->wrapWikiMsg( "\n$1\n
", array( 'userjsyoucanpreview' ) );
+ }
}
}
}
@@ -2148,14 +2157,16 @@ class EditPage {
* @return String
*/
protected function getSummaryPreview( $isSubjectPreview, $summary = "" ) {
- if ( !$summary || ( !$this->preview && !$this->diff ) )
+ if ( !$summary || ( !$this->preview && !$this->diff ) ) {
return "";
+ }
global $wgParser;
- if ( $isSubjectPreview )
+ if ( $isSubjectPreview ) {
$summary = wfMessage( 'newsectionsummary', $wgParser->stripSectionName( $summary ) )
->inContentLanguage()->text();
+ }
$message = $isSubjectPreview ? 'subject-preview' : 'summary-preview';
@@ -2174,8 +2185,9 @@ class EditPage {
HTML
);
- if ( !$this->checkUnicodeCompliantBrowser() )
+ if ( !$this->checkUnicodeCompliantBrowser() ) {
$wgOut->addHTML( Html::hidden( 'safemode', '1' ) );
+ }
}
protected function showFormAfterText() {
@@ -2285,13 +2297,15 @@ HTML
protected function displayPreviewArea( $previewOutput, $isOnTop = false ) {
global $wgOut;
$classes = array();
- if ( $isOnTop )
+ if ( $isOnTop ) {
$classes[] = 'ontop';
+ }
$attribs = array( 'id' => 'wikiPreview', 'class' => implode( ' ', $classes ) );
- if ( $this->formtype != 'preview' )
+ if ( $this->formtype != 'preview' ) {
$attribs['style'] = 'display: none;';
+ }
$wgOut->addHTML( Xml::openElement( 'div', $attribs ) );
@@ -2568,10 +2582,13 @@ HTML
);
// Quick paranoid permission checks...
if ( is_object( $data ) ) {
- if ( $data->log_deleted & LogPage::DELETED_USER )
+ if ( $data->log_deleted & LogPage::DELETED_USER ) {
$data->user_name = wfMessage( 'rev-deleted-user' )->escaped();
- if ( $data->log_deleted & LogPage::DELETED_COMMENT )
+ }
+
+ if ( $data->log_deleted & LogPage::DELETED_COMMENT ) {
$data->log_comment = wfMessage( 'rev-deleted-comment' )->escaped();
+ }
}
return $data;
}
diff --git a/includes/ExternalStore.php b/includes/ExternalStore.php
index 61d4ef7c378..391829af1b7 100644
--- a/includes/ExternalStore.php
+++ b/includes/ExternalStore.php
@@ -50,8 +50,9 @@ class ExternalStore {
static function fetchFromURL( $url, $params = array() ) {
global $wgExternalStores;
- if( !$wgExternalStores )
+ if( !$wgExternalStores ) {
return false;
+ }
$parts = explode( '://', $url, 2 );
@@ -66,8 +67,10 @@ class ExternalStore {
}
$store = self::getStoreObject( $proto, $params );
- if ( $store === false )
+ if ( $store === false ) {
return false;
+ }
+
return $store->fetchFromURL( $url );
}
@@ -80,11 +83,14 @@ class ExternalStore {
*/
static function getStoreObject( $proto, $params = array() ) {
global $wgExternalStores;
- if( !$wgExternalStores )
+ if( !$wgExternalStores ) {
return false;
+ }
+
/* Protocol not enabled */
- if( !in_array( $proto, $wgExternalStores ) )
+ if( !in_array( $proto, $wgExternalStores ) ) {
return false;
+ }
$class = 'ExternalStore' . ucfirst( $proto );
/* Any custom modules should be added to $wgAutoLoadClasses for on-demand loading */
diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php
index e75ad72944d..7e616b24933 100644
--- a/includes/FileDeleteForm.php
+++ b/includes/FileDeleteForm.php
@@ -374,8 +374,9 @@ class FileDeleteForm {
$q = array();
$q['action'] = 'delete';
- if( $this->oldimage )
+ if( $this->oldimage ) {
$q['oldimage'] = $this->oldimage;
+ }
return $this->title->getLocalUrl( $q );
}
diff --git a/includes/Licenses.php b/includes/Licenses.php
index ba504a9942b..4d2229f0a08 100644
--- a/includes/Licenses.php
+++ b/includes/Licenses.php
@@ -117,7 +117,7 @@ class Licenses extends HTMLFormField {
* @param $depth int
*/
protected function makeHtml( $tagset, $depth = 0 ) {
- foreach ( $tagset as $key => $val )
+ foreach ( $tagset as $key => $val ) {
if ( is_array( $val ) ) {
$this->html .= $this->outputOption(
$key, '',
@@ -135,6 +135,7 @@ class Licenses extends HTMLFormField {
$depth
);
}
+ }
}
/**
@@ -148,8 +149,10 @@ class Licenses extends HTMLFormField {
$msgObj = $this->msg( $message );
$text = $msgObj->exists() ? $msgObj->text() : $message;
$attribs['value'] = $value;
- if ( $value === $this->selected )
+ if ( $value === $this->selected ) {
$attribs['selected'] = 'selected';
+ }
+
$val = str_repeat( /*   */ "\xc2\xa0", $depth * 2 ) . $text;
return str_repeat( "\t", $depth ) . Xml::element( 'option', $attribs, $val ) . "\n";
}