Remove underscore from classes LCStore_*
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Sun, 17 Nov 2013 21:09:31 +0000 (22:09 +0100)
committerSiebrand Mazeland <s.mazeland@xs4all.nl>
Sun, 17 Nov 2013 21:09:31 +0000 (22:09 +0100)
iPart of program to remove underscores from class names. Checked core and
600+ extensions for occurrences. All uses are in core, and are updated in
this change.

Change-Id: I432dc249d22053728013ae7d0d56c3c398021c5e

includes/AutoLoader.php
includes/cache/LocalisationCache.php
maintenance/doMaintenance.php
maintenance/dumpIterator.php
maintenance/update.php
tests/phpunit/phpunit.php

index ac6f716..6afd164 100644 (file)
@@ -128,10 +128,10 @@ $wgAutoloadLocalClasses = array(
        'IndexPager' => 'includes/Pager.php',
        'Interwiki' => 'includes/interwiki/Interwiki.php',
        'LCStore' => 'includes/cache/LocalisationCache.php',
-       'LCStore_Accel' => 'includes/cache/LocalisationCache.php',
-       'LCStore_CDB' => 'includes/cache/LocalisationCache.php',
-       'LCStore_DB' => 'includes/cache/LocalisationCache.php',
-       'LCStore_Null' => 'includes/cache/LocalisationCache.php',
+       'LCStoreAccel' => 'includes/cache/LocalisationCache.php',
+       'LCStoreCDB' => 'includes/cache/LocalisationCache.php',
+       'LCStoreDB' => 'includes/cache/LocalisationCache.php',
+       'LCStoreNull' => 'includes/cache/LocalisationCache.php',
        'License' => 'includes/Licenses.php',
        'Licenses' => 'includes/Licenses.php',
        'Linker' => 'includes/Linker.php',
index 2d017b3..3838c9b 100644 (file)
@@ -195,16 +195,16 @@ class LocalisationCache {
                        switch ( $conf['store'] ) {
                                case 'files':
                                case 'file':
-                                       $storeClass = 'LCStore_CDB';
+                                       $storeClass = 'LCStoreCDB';
                                        break;
                                case 'db':
-                                       $storeClass = 'LCStore_DB';
+                                       $storeClass = 'LCStoreDB';
                                        break;
                                case 'accel':
-                                       $storeClass = 'LCStore_Accel';
+                                       $storeClass = 'LCStoreAccel';
                                        break;
                                case 'detect':
-                                       $storeClass = $wgCacheDirectory ? 'LCStore_CDB' : 'LCStore_DB';
+                                       $storeClass = $wgCacheDirectory ? 'LCStoreCDB' : 'LCStoreDB';
                                        break;
                                default:
                                        throw new MWException(
@@ -404,7 +404,7 @@ class LocalisationCache {
                $deps = $this->store->get( $code, 'deps' );
                $keys = $this->store->get( $code, 'list' );
                $preload = $this->store->get( $code, 'preload' );
-               // Different keys may expire separately, at least in LCStore_Accel
+               // Different keys may expire separately, at least in LCStoreAccel
                if ( $deps === null || $keys === null || $preload === null ) {
                        wfDebug( __METHOD__ . "($code): cache missing, need to make one\n" );
 
@@ -901,7 +901,7 @@ class LocalisationCache {
                # Clear out the MessageBlobStore
                # HACK: If using a null (i.e. disabled) storage backend, we
                # can't write to the MessageBlobStore either
-               if ( !$this->store instanceof LCStore_Null ) {
+               if ( !$this->store instanceof LCStoreNull ) {
                        MessageBlobStore::clear();
                }
 
@@ -966,7 +966,7 @@ class LocalisationCache {
         * Disable the storage backend
         */
        public function disableBackend() {
-               $this->store = new LCStore_Null;
+               $this->store = new LCStoreNull;
                $this->manualRecache = false;
        }
 }
@@ -1021,7 +1021,7 @@ interface LCStore {
  * This will work if one of XCache, WinCache or APC cacher is configured.
  * (See ObjectCache.php)
  */
-class LCStore_Accel implements LCStore {
+class LCStoreAccel implements LCStore {
        var $currentLang;
        var $keys;
 
@@ -1070,7 +1070,7 @@ class LCStore_Accel implements LCStore {
  * LCStore implementation which uses the standard DB functions to store data.
  * This will work on any MediaWiki installation.
  */
-class LCStore_DB implements LCStore {
+class LCStoreDB implements LCStore {
        var $currentLang;
        var $writesDone = false;
 
@@ -1173,7 +1173,7 @@ class LCStore_DB implements LCStore {
  *
  * See Cdb.php and http://cr.yp.to/cdb.html
  */
-class LCStore_CDB implements LCStore {
+class LCStoreCDB implements LCStore {
        var $readers, $writer, $currentLang, $directory;
 
        function __construct( $conf = array() ) {
@@ -1254,7 +1254,7 @@ class LCStore_CDB implements LCStore {
 /**
  * Null store backend, used to avoid DB errors during install
  */
-class LCStore_Null implements LCStore {
+class LCStoreNull implements LCStore {
        public function get( $code, $key ) {
                return null;
        }
index 3bd508c..3157318 100644 (file)
@@ -98,7 +98,7 @@ if ( $maintenance->getDbType() === Maintenance::DB_ADMIN &&
 
 if ( $maintenance->getDbType() === Maintenance::DB_NONE ) {
        if ( $wgLocalisationCacheConf['storeClass'] === false && ( $wgLocalisationCacheConf['store'] == 'db' || ( $wgLocalisationCacheConf['store'] == 'detect' && !$wgCacheDirectory ) ) ) {
-               $wgLocalisationCacheConf['storeClass'] = 'LCStore_Null';
+               $wgLocalisationCacheConf['storeClass'] = 'LCStoreNull';
        }
 }
 $maintenance->finalSetup();
index dd468a9..73296b7 100644 (file)
@@ -97,7 +97,7 @@ abstract class DumpIterator extends Maintenance {
                if ( $this->getDbType() == Maintenance::DB_NONE ) {
                        global $wgUseDatabaseMessages, $wgLocalisationCacheConf, $wgHooks;
                        $wgUseDatabaseMessages = false;
-                       $wgLocalisationCacheConf['storeClass'] = 'LCStore_Null';
+                       $wgLocalisationCacheConf['storeClass'] = 'LCStoreNull';
                        $wgHooks['InterwikiLoadPrefix'][] = 'DumpIterator::disableInterwikis';
                }
        }
index 5c93964..e39661a 100644 (file)
@@ -180,7 +180,7 @@ class UpdateMediaWiki extends Maintenance {
                # cache from $wgExtensionFunctions (bug 20471)
                $wgLocalisationCacheConf = array(
                        'class' => 'LocalisationCache',
-                       'storeClass' => 'LCStore_Null',
+                       'storeClass' => 'LCStoreNull',
                        'storeDirectory' => false,
                        'manualRecache' => false,
                );
index 1d65e52..401b8a8 100755 (executable)
@@ -49,7 +49,7 @@ class PHPUnitMaintClass extends Maintenance {
                // Assume UTC for testing purposes
                $wgLocaltimezone = 'UTC';
 
-               $wgLocalisationCacheConf['storeClass'] = 'LCStore_Null';
+               $wgLocalisationCacheConf['storeClass'] = 'LCStoreNull';
 
                // Bug 44192 Do not attempt to send a real e-mail
                Hooks::clear( 'AlternateUserMailer' );