X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Fregistration%2FExtensionProcessor.php;h=84e873dd6cdc107ca90ddd1c049d8acdf468d1a1;hb=c54766586acab549f186e81eeab259845112809d;hp=dc35347bdb4a308fbd02e2a3ca026c49a7c2d2a0;hpb=2f3fddb0d9695ff25113c553f87aa0f3ee3832f3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/registration/ExtensionProcessor.php b/includes/registration/ExtensionProcessor.php index dc35347bdb..84e873dd6c 100644 --- a/includes/registration/ExtensionProcessor.php +++ b/includes/registration/ExtensionProcessor.php @@ -58,7 +58,7 @@ class ExtensionProcessor implements Processor { 'wgRevokePermissions' => 'array_plus_2d', 'wgHooks' => 'array_merge_recursive', // credits are handled in the ExtensionRegistry - //'wgExtensionCredits' => 'array_merge_recursive', + // 'wgExtensionCredits' => 'array_merge_recursive', 'wgExtraGenderNamespaces' => 'array_plus', 'wgNamespacesWithSubpages' => 'array_plus', 'wgNamespaceContentModels' => 'array_plus', @@ -192,6 +192,16 @@ class ExtensionProcessor implements Processor { ); } + public function getRequirements( array $info ) { + $requirements = array(); + $key = ExtensionRegistry::MEDIAWIKI_CORE; + if ( isset( $info['requires'][$key] ) ) { + $requirements[$key] = $info['requires'][$key]; + } + + return $requirements; + } + protected function extractHooks( array $info ) { if ( isset( $info['Hooks'] ) ) { foreach ( $info['Hooks'] as $name => $value ) { @@ -305,9 +315,15 @@ class ExtensionProcessor implements Processor { */ protected function extractConfig( array $info ) { if ( isset( $info['config'] ) ) { + if ( isset( $info['config']['_prefix'] ) ) { + $prefix = $info['config']['_prefix']; + unset( $info['config']['_prefix'] ); + } else { + $prefix = 'wg'; + } foreach ( $info['config'] as $key => $val ) { if ( $key[0] !== '@' ) { - $this->globals["wg$key"] = $val; + $this->globals["$prefix$key"] = $val; } } }