r107925 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107924‎ | r107925 | r107926 >
Date:19:24, 3 January 2012
Author:danwe
Status:ok
Tags:
Comment:
'Hash' format will now be active if HashTables extension >= 1.0 alpha detected.
Modified paths:
  • /trunk/extensions/SemanticResultFormats/Array/SRF_Array.php (modified) (history)
  • /trunk/extensions/SemanticResultFormats/SRF_Settings.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/SRF_Settings.php
@@ -51,7 +51,10 @@
5252 }
5353
5454 # load hash format only if HashTables extension is initialised, otherwise 'Array' format is enough
55 -if( isset( $wgHashTables ) ) {
 55+if( defined( 'ExtHashTables::VERSION' )
 56+ && version_compare( ExtHashTables::VERSION, '0.999', '>=' )
 57+ || isset( $wgHashTables ) // Version < 1.0 alpha
 58+) {
5659 $srfgFormats[] = 'hash';
5760 }
5861
Index: trunk/extensions/SemanticResultFormats/Array/SRF_Array.php
@@ -423,9 +423,6 @@
424424 return parent::deliverQueryResultPages( $hash );
425425 }
426426
427 - /**
428 - * @ToDo: adjust for HashTables 0.8
429 - */
430427 protected function createArray( $hash ) {
431428 global $wgHashTables;
432429
@@ -440,7 +437,7 @@
441438 ExtHashTables::get( $wgParser )->createHash( $hashId, $hash );
442439 }
443440 elseif( ! isset( $wgHashTables ) ) {
444 - //Hash extension is not installed in this wiki
 441+ // Hash extension is not installed in this wiki
445442 return false;
446443 }
447444 elseif( $version !== null && version_compare( $version, '0.6', '>=' ) ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r109559Follow up to r107925; fix checkjeroendedauw18:39, 19 January 2012

Status & tagging log