Index: trunk/extensions/ExternalData/ED_GetData.php |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | */ |
15 | 15 | function __construct() { |
16 | 16 | parent::__construct( 'GetData' ); |
17 | | - |
| 17 | + EDUtils::loadMessages(); |
18 | 18 | } |
19 | 19 | |
20 | 20 | function execute( $query ) { |
Index: trunk/extensions/ExternalData/ED_Utils.php |
— | — | @@ -11,6 +11,16 @@ |
12 | 12 | // how many times to try an HTTP request |
13 | 13 | private static $http_number_of_tries = 3; |
14 | 14 | |
| 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 | + |
15 | 25 | // XML-handling functions based on code found at |
16 | 26 | // http://us.php.net/xml_set_element_handler |
17 | 27 | static function startElement( $parser, $name, $attrs ) { |