r96876 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96875‎ | r96876 | r96877 >
Date:18:01, 12 September 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
drop compat code causing php errors for several people
Modified paths:
  • /trunk/extensions/SemanticResultFormats/Array/SRF_Array.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/Array/SRF_Array.php
@@ -4,6 +4,8 @@
55 * @file
66 * @ingroup SemanticResultFormats
77 * @author Daniel Werner
 8+ *
 9+ * Requires ArrayExtension 1.3.2 or higher and HashTables 0.6 or higher
810 */
911
1012 /**
@@ -245,11 +247,7 @@
246248
247249 $arrExtClass = new ReflectionClass( get_class( $wgArrayExtension ) );
248250
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 );
254252
255253 return true;
256254 }
@@ -305,12 +303,7 @@
306304
307305 $hashExtClass = new ReflectionClass( get_class( $wgHashTables ) );
308306
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 );
315308
316309 return true;
317310 }