Index: trunk/extensions/SemanticCompoundQueries/SCQ_QueryProcessor.php |
— | — | @@ -111,9 +111,17 @@ |
112 | 112 | $format = 'auto'; |
113 | 113 | if ( array_key_exists( 'format', $params ) ) { |
114 | 114 | $format = strtolower( trim( $params['format'] ) ); |
115 | | - global $smwgResultFormats; |
| 115 | + global $smwgResultAliases, $smwgResultFormats; |
116 | 116 | if ( !array_key_exists( $format, $smwgResultFormats ) ) { |
117 | | - $format = 'auto'; // If it is an unknown format, defaults to list/table again |
| 117 | + $is_alias = false; |
| 118 | + foreach ( $smwgResultAliases as $main_format => $aliases ) { |
| 119 | + if ( in_array( $format, $aliases ) ) { |
| 120 | + $format = $main_format; |
| 121 | + $is_alias = true; |
| 122 | + break; |
| 123 | + } |
| 124 | + } |
| 125 | + if ( !$is_alias ) $format = 'auto'; // If it is an unknown format, defaults to list/table again |
118 | 126 | } |
119 | 127 | } |
120 | 128 | return $format; |