* @throws InvalidArgumentException
*/
public function __construct( $options = [], $localBasePath = null ) {
- $this->localBasePath = self::extractLocalBasePath( $options, $localBasePath );
+ $this->localBasePath = static::extractLocalBasePath( $options, $localBasePath );
$this->definition = $options;
}
return $definition;
}
+
+ public static function extractLocalBasePath( $options, $localBasePath = null ) {
+ global $IP;
+ if ( $localBasePath === null ) {
+ $localBasePath = $IP;
+ }
+ // Ignore any 'localBasePath' present in $options, this always refers to files in MediaWiki core
+ return $localBasePath;
+ }
}