r73753 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73752‎ | r73753 | r73754 >
Date:16:56, 25 September 2010
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Remove some unused keys from foreach

Documentation tweaks
Modified paths:
  • /trunk/phase3/includes/api/ApiFormatXml.php (modified) (history)
  • /trunk/phase3/includes/api/ApiMain.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryImageInfo.php (modified) (history)
  • /trunk/phase3/includes/api/ApiUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiFormatXml.php
@@ -155,7 +155,7 @@
156156 $retval .= self::recXmlPrint( $subElemId, $subElemValue, $indent );
157157 }
158158
159 - foreach ( $indElements as $subElemId => & $subElemValue ) {
 159+ foreach ( $indElements as &$subElemValue ) {
160160 $retval .= self::recXmlPrint( $subElemIndName, $subElemValue, $indent );
161161 }
162162
Index: trunk/phase3/includes/api/ApiMain.php
@@ -583,7 +583,7 @@
584584
585585 /**
586586 * Check for sufficient permissions to execute
587 - * @param $module object An Api module
 587+ * @param $module ApiBase An Api module
588588 */
589589 protected function checkExecutePermissions( $module ) {
590590 global $wgUser;
@@ -607,7 +607,7 @@
608608
609609 /**
610610 * Check POST for external response and setup result printer
611 - * @param $module object An Api module
 611+ * @param $module ApiBase An Api module
612612 * @param $params Array an array with the request parameters
613613 */
614614 protected function setupExternalResponse( $module, $params ) {
Index: trunk/phase3/includes/api/ApiQueryImageInfo.php
@@ -264,6 +264,11 @@
265265 return $vals;
266266 }
267267
 268+ /*
 269+ *
 270+ * param $metadata Array
 271+ * param $result ApiResult
 272+ */
268273 public static function processMetaData( $metadata, $result ) {
269274 $retval = array();
270275 if ( is_array( $metadata ) ) {
Index: trunk/phase3/includes/api/ApiUpload.php
@@ -285,7 +285,7 @@
286286
287287 if ( isset( $warnings['duplicate'] ) ) {
288288 $dupes = array();
289 - foreach ( $warnings['duplicate'] as $key => $dupe ) {
 289+ foreach ( $warnings['duplicate'] as $dupe ) {
290290 $dupes[] = $dupe->getName();
291291 }
292292 $this->getResult()->setIndexedTagName( $dupes, 'duplicate' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r73757Add missing @'s to r73753, document return typereedy17:17, 25 September 2010

Comments

#Comment by Nikerabbit (talk | contribs)   17:04, 25 September 2010

@

+	 * param $metadata Array
+	 * param $result ApiResult
#Comment by Reedy (talk | contribs)   17:11, 25 September 2010

?

#Comment by Nikerabbit (talk | contribs)   17:13, 25 September 2010

Should be @param, right?

#Comment by Reedy (talk | contribs)   17:16, 25 September 2010

Oh, duh. Yeah. Cheers :)

Status & tagging log