Move some braces
authorSam Reed <reedy@users.mediawiki.org>
Sun, 13 Jun 2010 01:23:12 +0000 (01:23 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sun, 13 Jun 2010 01:23:12 +0000 (01:23 +0000)
Add some to a for loop

includes/api/ApiQueryInfo.php

index 442e4e6..88d2166 100644 (file)
@@ -319,18 +319,15 @@ class ApiQueryInfo extends ApiQueryBase {
                        $this->getResult()->setIndexedTagName( $pageInfo['protection'], 'pr' );
                }
 
-               if ( $this->fld_watched && isset( $this->watched[$title->getNamespace()][$title->getDBkey()] ) )
-               {
+               if ( $this->fld_watched && isset( $this->watched[$title->getNamespace()][$title->getDBkey()] ) ) {
                        $pageInfo['watched'] = '';
                }
 
-               if ( $this->fld_talkid && isset( $this->talkids[$title->getNamespace()][$title->getDBkey()] ) )
-               {
+               if ( $this->fld_talkid && isset( $this->talkids[$title->getNamespace()][$title->getDBkey()] ) ) {
                        $pageInfo['talkid'] = $this->talkids[$title->getNamespace()][$title->getDBkey()];
                }
 
-               if ( $this->fld_subjectid && isset( $this->subjectids[$title->getNamespace()][$title->getDBkey()] ) )
-               {
+               if ( $this->fld_subjectid && isset( $this->subjectids[$title->getNamespace()][$title->getDBkey()] ) ) {
                        $pageInfo['subjectid'] = $this->subjectids[$title->getNamespace()][$title->getDBkey()];
                }
 
@@ -442,12 +439,13 @@ class ApiQueryInfo extends ApiQueryBase {
 
                // Cascading protections
                $images = $others = array();
-               foreach ( $this->everything as $title )
+               foreach ( $this->everything as $title ) {
                        if ( $title->getNamespace() == NS_FILE ) {
                                $images[] = $title->getDBkey();
                        } else {
                                $others[] = $title;
                        }
+               }
 
                if ( count( $others ) ) {
                        // Non-images: check templatelinks