Index: trunk/extensions/SemanticResultFormats/SemanticResultFormats.php |
— | — | @@ -75,7 +75,7 @@ |
76 | 76 | * @since 1.5.2 |
77 | 77 | */ |
78 | 78 | function srffInitFormats() { |
79 | | - global $srfgFormats, $smwgResultFormats, $wgAutoloadClasses; |
| 79 | + global $srfgFormats, $smwgResultFormats, $smwgResultAliases, $wgAutoloadClasses; |
80 | 80 | |
81 | 81 | $formatDir = dirname( __FILE__ ) . '/'; |
82 | 82 | |
— | — | @@ -121,6 +121,10 @@ |
122 | 122 | 'tagcloud' => 'SRFTagCloud', |
123 | 123 | ); |
124 | 124 | |
| 125 | + $formatAliases = array( |
| 126 | + 'tagcloud' => array( 'tag cloud' ) |
| 127 | + ); |
| 128 | + |
125 | 129 | foreach ( $srfgFormats as $format ) { |
126 | 130 | if ( array_key_exists( $format, $formatClasses ) ) { |
127 | 131 | $smwgResultFormats[$format] = $formatClasses[$format]; |
— | — | @@ -128,6 +132,10 @@ |
129 | 133 | if ( method_exists( $formatClasses[$format], 'registerResourceModules' ) ) { |
130 | 134 | call_user_func( array( $formatClasses[$format], 'registerResourceModules' ) ); |
131 | 135 | } |
| 136 | + |
| 137 | + if ( isset( $smwgResultAliases ) && array_key_exists( $format, $formatAliases ) ) { |
| 138 | + $smwgResultAliases[$format] = $formatAliases[$format]; |
| 139 | + } |
132 | 140 | } |
133 | 141 | else { |
134 | 142 | wfDebug( "There is not result format class associated with the format '$format'." ); |