r28804 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r28803‎ | r28804 | r28805 >
Date:18:41, 23 December 2007
Author:siebrand
Status:old
Tags:
Comment:
Add meta group containing all extensions used by Wikimedia (thanks to Niklas for the help)
Modified paths:
  • /trunk/extensions/Translate/MessageGroups.php (modified) (history)
  • /trunk/extensions/Translate/Translate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/Translate.php
@@ -75,6 +75,7 @@
7676 'core' => 'CoreMessageGroup',
7777 'core-mostused' => 'CoreMostUsedMessageGroup',
7878 'ext-0-all' => 'AllMediawikiExtensionsGroup',
 79+'ext-0-wikimedia' => 'AllWikimediaExtensionsGroup',
7980 'ext-advancedrandom' => 'AdvancedRandomMessageGroup',
8081 'ext-ajaxshoweditors' => 'AjaxShowEditorsMessageGroup',
8182 'ext-antispoof' => 'AntiSpoofMessageGroup',
Index: trunk/extensions/Translate/MessageGroups.php
@@ -530,18 +530,17 @@
531531
532532 }
533533
534 -
535534 class AllMediawikiExtensionsGroup extends ExtensionMessageGroup {
536535 protected $label = 'All extensions';
537536 protected $id = 'ext-0-all';
538537 protected $meta = true;
539538
540 - private $classes = null;
 539+ protected $classes = null;
541540
542541 // Don't add the (mw ext) thingie
543542 public function getLabel() { return $this->label; }
544543
545 - private function init() {
 544+ protected function init() {
546545 if ( $this->classes === null ) {
547546 $this->classes = MessageGroups::singleton()->getGroups();
548547 foreach ( $this->classes as $index => $class ) {
@@ -624,6 +623,61 @@
625624
626625 }
627626
 627+class AllWikimediaExtensionsGroup extends AllMediawikiExtensionsGroup {
 628+ protected $label = 'All extensions used by Wikimedia';
 629+ protected $id = 'ext-0-wikimedia';
 630+ protected $meta = true;
 631+
 632+ protected $classes = null;
 633+
 634+ protected $wmfextensions = array(
 635+ 'ext-antispoof',
 636+ 'ext-assertedit',
 637+ 'ext-boardvote',
 638+ 'ext-bookinformation',
 639+ 'ext-categorytree',
 640+ 'ext-checkuser',
 641+ 'ext-cite',
 642+ 'ext-citespecial',
 643+ 'ext-confirmedit',
 644+ 'ext-crossnamespacelinks',
 645+ 'ext-deletedcontribs',
 646+ 'ext-dismissablesitenotice',
 647+ 'ext-expandtemplates',
 648+ 'ext-filepath',
 649+ 'ext-gadgets',
 650+ 'ext-imagemap',
 651+ 'ext-inputbox',
 652+ 'ext-intersection',
 653+ 'ext-linksearch',
 654+ 'ext-lucenesearch',
 655+ 'ext-makebot',
 656+ 'ext-makesysop',
 657+ 'ext-newuserlog',
 658+ 'ext-nuke',
 659+ 'ext-ogghandler',
 660+ 'ext-oversight',
 661+ 'ext-proofreadpage',
 662+ 'ext-quiz',
 663+ 'ext-renameuser',
 664+ 'ext-scanset',
 665+ 'ext-sitematrix',
 666+ 'ext-spamblacklist',
 667+ 'ext-syntaxhighlightgeshi',
 668+ 'ext-usernameblacklist',
 669+ );
 670+
 671+ protected function init() {
 672+ if ( $this->classes === null ) {
 673+ $this->classes = MessageGroups::singleton()->getGroups();
 674+ $this->classes = array_intersect_key(
 675+ $this->classes,
 676+ array_flip( $this->wmfextensions )
 677+ );
 678+ }
 679+ }
 680+}
 681+
628682 class AdvancedRandomMessageGroup extends ExtensionMessageGroup {
629683 protected $label = 'Advanced Random';
630684 protected $id = 'ext-advancedrandom';

Status & tagging log