r59853 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59852‎ | r59853 | r59854 >
Date:22:26, 8 December 2009
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Small fix to aliasing code.
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php
@@ -313,19 +313,17 @@
314314 * Determine format label from parameters.
315315 */
316316 static protected function getResultFormat($params) {
317 - global $smwgResultAliases;
318 -
319317 $format = 'auto';
320318 if (array_key_exists('format', $params)) {
321319 $format = strtolower(trim($params['format']));
322 - global $smwgResultFormats;
 320+ global $smwgResultAliases, $smwgResultFormats;
323321 if ( !array_key_exists($format, $smwgResultFormats) ) {
324322 $is_alias = false;
325323 foreach ($smwgResultAliases as $main_format => $aliases) {
326324 if (in_array($format, $aliases)) {
327325 $format = $main_format;
328326 $is_alias = true;
329 - continue;
 327+ break;
330328 }
331329 }
332330 if (!$is_alias) $format = 'auto'; // If it is an unknown format, defaults to list/table again

Status & tagging log