Move MW_LC_VERSION to class constant instead of global define
authorChad Horohoe <chadh@wikimedia.org>
Wed, 6 Aug 2014 12:35:48 +0000 (13:35 +0100)
committerChad Horohoe <chadh@wikimedia.org>
Wed, 6 Aug 2014 12:36:46 +0000 (13:36 +0100)
Change-Id: I184ec13081a5cf60d593a1c25c091b1db7b344a9

includes/cache/LocalisationCache.php

index cf87129..eb6a57a 100644 (file)
@@ -20,8 +20,6 @@
  * @file
  */
 
-define( 'MW_LC_VERSION', 2 );
-
 /**
  * Class for caching the contents of localisation files, Messages*.php
  * and *.i18n.php.
@@ -35,6 +33,8 @@ define( 'MW_LC_VERSION', 2 );
  * as grammatical transformation, is done by the caller.
  */
 class LocalisationCache {
+       const VERSION = 2;
+
        /** Configuration associative array */
        private $conf;
 
@@ -913,7 +913,7 @@ class LocalisationCache {
                # Add cache dependencies for any referenced globals
                $deps['wgExtensionMessagesFiles'] = new GlobalDependency( 'wgExtensionMessagesFiles' );
                $deps['wgMessagesDirs'] = new GlobalDependency( 'wgMessagesDirs' );
-               $deps['version'] = new ConstantDependency( 'MW_LC_VERSION' );
+               $deps['version'] = new ConstantDependency( 'LocalisationCache::VERSION' );
 
                # Add dependencies to the cache entry
                $allData['deps'] = $deps;