Index: trunk/extensions/SemanticResultFormats/Array/SRF_Array.php |
— | — | @@ -4,6 +4,8 @@ |
5 | 5 | * @file |
6 | 6 | * @ingroup SemanticResultFormats |
7 | 7 | * @author Daniel Werner |
| 8 | + * |
| 9 | + * Requires ArrayExtension 1.3.2 or higher and HashTables 0.6 or higher |
8 | 10 | */ |
9 | 11 | |
10 | 12 | /** |
— | — | @@ -245,11 +247,7 @@ |
246 | 248 | |
247 | 249 | $arrExtClass = new ReflectionClass( get_class( $wgArrayExtension ) ); |
248 | 250 | |
249 | | - if( $arrExtClass->hasConstant( 'VERSION' ) && version_compare( $wgArrayExtension::VERSION, '1.3.2', '>=' ) ) { |
250 | | - $wgArrayExtension->createArray( $this->mArrayName, $arr ); //requires Extension:ArrayExtension 1.3.2 or higher |
251 | | - } else { |
252 | | - $wgArrayExtension->mArrayExtension[ $this->mArrayName ] = $arr; //dirty way |
253 | | - } |
| 251 | + $wgArrayExtension->createArray( $this->mArrayName, $arr ); |
254 | 252 | |
255 | 253 | return true; |
256 | 254 | } |
— | — | @@ -305,12 +303,7 @@ |
306 | 304 | |
307 | 305 | $hashExtClass = new ReflectionClass( get_class( $wgHashTables ) ); |
308 | 306 | |
309 | | - if ( $hashExtClass->hasConstant( 'VERSION' ) && version_compare( $wgHashTables::VERSION, '0.6', '>=' ) ) { |
310 | | - $wgHashTables->createHash( $this->mArrayName, $hash ); // requires Extension:HashTables 0.6 or higher |
311 | | - } |
312 | | - else { |
313 | | - $wgHashTables->mHashTables[ $this->mArrayName ] = $hash; |
314 | | - } |
| 307 | + $wgHashTables->createHash( $this->mArrayName, $hash ); |
315 | 308 | |
316 | 309 | return true; |
317 | 310 | } |