This function takes the class file path, and iterates up through its
parent directories until it hits either a registered extension, or $IP
(for core) or $IP/extensions (for an unknown extension). This change
adds $wgExtensionDirectory as another iteration stopper, so that
unregistered extensions in $wgExtensionDirectory will not cause
iteration back up to the filesystem root, or to $IP if
$wgExtensionDirectory is a child of $IP other than $IP/extensions.
Change-Id: I06553591b0b6156e945aad5176479eb71517e77d
// Build map of extension directories to extension info
if ( self::$extensionInfo === null ) {
+ $extDir = $this->getConfig()->get( 'ExtensionDirectory' );
self::$extensionInfo = [
realpath( __DIR__ ) ?: __DIR__ => [
'path' => $IP,
'license-name' => 'GPL-2.0+',
],
realpath( "$IP/extensions" ) ?: "$IP/extensions" => null,
+ realpath( $extDir ) ?: $extDir => null,
];
$keep = [
'path' => null,