/**
* Bump whenever the registration cache needs resetting
*/
- const CACHE_VERSION = 1;
+ const CACHE_VERSION = 3;
/**
* Special key that defines the merge strategy
// we don't want to fail here if $wgObjectCaches is not configured
// properly for APC setup
try {
- $this->cache = ObjectCache::newAccelerator();
+ $this->cache = ObjectCache::getLocalServerInstance();
} catch ( MWException $e ) {
$this->cache = new EmptyBagOStuff();
}
public function readFromQueue( array $queue ) {
global $wgVersion;
$autoloadClasses = array();
+ $autoloaderPaths = array();
$processor = new ExtensionProcessor();
$incompatible = array();
$coreVersionParser = new CoreVersionChecker( $wgVersion );
. '.';
continue;
}
+ // Get extra paths for later inclusion
+ $autoloaderPaths = array_merge( $autoloaderPaths,
+ $processor->getExtraAutoloaderPaths( dirname( $path ), $info ) );
// Compatible, read and extract info
$processor->extractInfo( $path, $info, $version );
}
$data = $processor->getExtractedInfo();
// Need to set this so we can += to it later
$data['globals']['wgAutoloadClasses'] = array();
- foreach ( $data['credits'] as $credit ) {
- $data['globals']['wgExtensionCredits'][$credit['type']][] = $credit;
- }
- $data['globals']['wgExtensionCredits'][self::MERGE_STRATEGY] = 'array_merge_recursive';
$data['autoload'] = $autoloadClasses;
+ $data['autoloaderPaths'] = $autoloaderPaths;
return $data;
}
call_user_func( $cb );
}
- $this->loaded += $info['credits'];
+ foreach ( $info['autoloaderPaths'] as $path ) {
+ require_once $path;
+ }
+ $this->loaded += $info['credits'];
if ( $info['attributes'] ) {
if ( !$this->attributes ) {
$this->attributes = $info['attributes'];