Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php |
— | — | @@ -313,19 +313,17 @@ |
314 | 314 | * Determine format label from parameters. |
315 | 315 | */ |
316 | 316 | static protected function getResultFormat($params) { |
317 | | - global $smwgResultAliases; |
318 | | - |
319 | 317 | $format = 'auto'; |
320 | 318 | if (array_key_exists('format', $params)) { |
321 | 319 | $format = strtolower(trim($params['format'])); |
322 | | - global $smwgResultFormats; |
| 320 | + global $smwgResultAliases, $smwgResultFormats; |
323 | 321 | if ( !array_key_exists($format, $smwgResultFormats) ) { |
324 | 322 | $is_alias = false; |
325 | 323 | foreach ($smwgResultAliases as $main_format => $aliases) { |
326 | 324 | if (in_array($format, $aliases)) { |
327 | 325 | $format = $main_format; |
328 | 326 | $is_alias = true; |
329 | | - continue; |
| 327 | + break; |
330 | 328 | } |
331 | 329 | } |
332 | 330 | if (!$is_alias) $format = 'auto'; // If it is an unknown format, defaults to list/table again |