From 8a7bccc5ce8a7766086a29d79c7bfd4bc1a6bc7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Laxstr=C3=B6m?= Date: Tue, 7 Jul 2015 21:28:09 +0200 Subject: [PATCH] Set ULS_VERSION when using extension registration This unbreaks Translate and CleanChanges who depend on the constant. Change-Id: I8bfb9e2aaeb77351beefb130f71daeee4e07afae --- UniversalLanguageSelector.hooks.php | 5 +++++ extension.json | 1 + 2 files changed, 6 insertions(+) diff --git a/UniversalLanguageSelector.hooks.php b/UniversalLanguageSelector.hooks.php index 4c7a5534..5724deb2 100644 --- a/UniversalLanguageSelector.hooks.php +++ b/UniversalLanguageSelector.hooks.php @@ -19,6 +19,11 @@ */ class UniversalLanguageSelectorHooks { + // Used when extension registration in use which skips the main php file + public static function setVersionConstant() { + define( 'ULS_VERSION', '2015-06-08' ); + } + /** * Whether ULS user toolbar (language selection and settings) is enabled. * diff --git a/extension.json b/extension.json index 5ef3b119..76250154 100644 --- a/extension.json +++ b/extension.json @@ -88,6 +88,7 @@ "@ULSCompactLinks": "Whether the \"Compact language links\" Beta Feature is exposed. Requires $wgULSPosition to be \"interlanguage\". Defaults to false. @since 2014.03", "ULSCompactLinks": false }, + "callback": "UniversalLanguageSelectorHooks::setVersionConstant", "ResourceModules": { "ext.uls.languagenames": { "class": "ResourceLoaderULSModule"