r59167 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59166‎ | r59167 | r59168 >
Date:08:19, 17 November 2009
Author:mkroetzsch
Status:deferred
Tags:
Comment:
minor code layout improvements
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php
@@ -319,20 +319,16 @@
320320 if (array_key_exists('format', $params)) {
321321 $format = strtolower(trim($params['format']));
322322 global $smwgResultFormats;
323 -
324323 if ( !array_key_exists($format, $smwgResultFormats) ) {
325 -
326 - $isAlias = false;
327 -
328 - foreach($smwgResultAliases as $mainFormat => $aliases) {
 324+ $is_alias = false;
 325+ foreach ($smwgResultAliases as $main_format => $aliases) {
329326 if (in_array($format, $aliases)) {
330 - $format = $mainFormat;
331 - $isAlias = true;
 327+ $format = $main_format;
 328+ $is_alias = true;
332329 continue;
333330 }
334331 }
335 -
336 - if (! $isAlias) $format = 'auto'; // If it is an unknown format, defaults to list/table again
 332+ if (!$is_alias) $format = 'auto'; // If it is an unknown format, defaults to list/table again
337333 }
338334 }
339335 return $format;

Status & tagging log