r58344 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58343‎ | r58344 | r58345 >
Date:22:05, 29 October 2009
Author:siebrand
Status:deferred
Tags:
Comment:
Populate meta group
Modified paths:
  • /trunk/extensions/Translate/groups/Wikia/WikiaExtensions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/groups/Wikia/WikiaExtensions.php
@@ -65,10 +65,21 @@
6666 protected function init() {
6767 if ( $this->classes === null ) {
6868 $this->classes = array();
 69+
6970 $classes = MessageGroups::singleton()->getGroups();
 71+
 72+ // Add regular MediaWiki extensions
7073 foreach ( $this->wikiaextensions as $key ) {
7174 $this->classes[$key] = $classes[$key];
7275 }
 76+
 77+ // Add extensions that have a wikia- prefix
 78+ foreach ( $classes as $index => $class ) {
 79+ if ( ( strpos( $index, 'wikia-' ) === 0 ) && !$class->isMeta() && $class->exists() ) {
 80+ $this->classes[$index] = $classes[$index];
 81+ $this->wikiaextensions[] = $index;
 82+ }
 83+ }
7384 }
7485 }
7586

Status & tagging log