From 75449ee41b3b6c2180eca4b8ba753cbf544678c8 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sun, 13 Jun 2010 01:23:12 +0000 Subject: [PATCH] Move some braces Add some to a for loop --- includes/api/ApiQueryInfo.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php index 442e4e62ff..88d2166a37 100644 --- a/includes/api/ApiQueryInfo.php +++ b/includes/api/ApiQueryInfo.php @@ -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 -- 2.20.1