r86475 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86474‎ | r86475 | r86476 >
Date:14:39, 20 April 2011
Author:yaron
Status:deferred
Tags:
Comment:
Re-added wfLoadExtensionMessages() call, this time called only with MW <= 1.16
Modified paths:
  • /trunk/extensions/ExternalData/ED_GetData.php (modified) (history)
  • /trunk/extensions/ExternalData/ED_Utils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ExternalData/ED_GetData.php
@@ -13,7 +13,7 @@
1414 */
1515 function __construct() {
1616 parent::__construct( 'GetData' );
17 -
 17+ EDUtils::loadMessages();
1818 }
1919
2020 function execute( $query ) {
Index: trunk/extensions/ExternalData/ED_Utils.php
@@ -11,6 +11,16 @@
1212 // how many times to try an HTTP request
1313 private static $http_number_of_tries = 3;
1414
 15+ /*
 16+ * Loads messages only for MediaWiki versions that need it (< 1.16)
 17+ */
 18+ public static function loadMessages() {
 19+ global $wgVersion;
 20+ if ( version_compare( $wgVersion, '1.16', '<' ) ) {
 21+ wfLoadExtensionMessages( 'SemanticForms' );
 22+ }
 23+ }
 24+
1525 // XML-handling functions based on code found at
1626 // http://us.php.net/xml_set_element_handler
1727 static function startElement( $parser, $name, $attrs ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r88448Fix to r86475 - wrong extension name!yaron12:35, 20 May 2011

Status & tagging log