Index: trunk/extensions/Translate/groups/MediaWikiExtensions.php |
— | — | @@ -27,13 +27,20 @@ |
28 | 28 | public function init() { |
29 | 29 | if ( $this->groups !== null ) return; |
30 | 30 | |
31 | | - global $wgAutoloadClasses, $IP, $wgConfigureExtDir; |
32 | | - if ( !isset( $wgConfigureExtDir ) ) { |
33 | | - $wgConfigureExtDir = "$IP/extensions/"; |
| 31 | + global $wgAutoloadClasses, $IP, $wgTranslateExtensionDirectory; |
| 32 | + |
| 33 | + $postfix = 'Configure/load_txt_def/TxtDef.php'; |
| 34 | + if ( file_exists( "$IP/extensions/$postfix" ) ) { |
| 35 | + $prefix = "$IP/extensions"; |
| 36 | + } elseif( file_exists( "$wgTranslateExtensionDirectory/$postfix" ) ) { |
| 37 | + $prefix = $wgTranslateExtensionDirectory; |
| 38 | + } else { |
| 39 | + $prefix = false; |
34 | 40 | } |
35 | | - $wgAutoloadClasses['TxtDef'] = $wgConfigureExtDir . "Configure/load_txt_def/TxtDef.php"; |
36 | | - if ( $this->useConfigure && class_exists( 'TxtDef' ) ) { |
37 | | - $tmp = TxtDef::loadFromFile( $wgConfigureExtDir . "Configure/settings/Settings-ext.txt" ); |
| 41 | + |
| 42 | + if ( $this->useConfigure && $prefix ) { |
| 43 | + $wgAutoloadClasses['TxtDef'] = "$prefix/$postfix"; |
| 44 | + $tmp = TxtDef::loadFromFile( "$prefix/Configure/settings/Settings-ext.txt" ); |
38 | 45 | $configureData = array_combine( array_map( array( __CLASS__, 'foldId' ), array_keys( $tmp ) ), array_values( $tmp ) ); |
39 | 46 | } else { |
40 | 47 | $configureData = array(); |
— | — | @@ -309,8 +316,6 @@ |
310 | 317 | /** |
311 | 318 | * Adds a message group containing all supported MediaWiki extensions used by |
312 | 319 | * Wikimedia. |
313 | | - * |
314 | | - * @todo Needs documentation. |
315 | 320 | */ |
316 | 321 | class AllWikimediaExtensionsGroup extends AllMediawikiExtensionsGroup { |
317 | 322 | protected $label = 'Extensions used by Wikimedia'; |
— | — | @@ -446,8 +451,6 @@ |
447 | 452 | /** |
448 | 453 | * Adds a message group containing all components of the MediaWiki extension |
449 | 454 | * Collection. |
450 | | - * |
451 | | - * @todo Needs documentation. |
452 | 455 | */ |
453 | 456 | class AllCollectionExtensionsGroup extends AllMediawikiExtensionsGroup { |
454 | 457 | protected $label = 'Collection'; |
— | — | @@ -476,8 +479,6 @@ |
477 | 480 | /** |
478 | 481 | * Adds a message group containing all components of the MediaWiki extension |
479 | 482 | * FlaggedRevs. |
480 | | - * |
481 | | - * @todo Needs documentation. |
482 | 483 | */ |
483 | 484 | class AllFlaggedRevsExtensionsGroup extends AllMediawikiExtensionsGroup { |
484 | 485 | protected $label = 'FlaggedRevs'; |
— | — | @@ -515,8 +516,6 @@ |
516 | 517 | /** |
517 | 518 | * Adds a message group containing all components of the MediaWiki extension |
518 | 519 | * ReaderFeedback. |
519 | | - * |
520 | | - * @todo Needs documentation. |
521 | 520 | */ |
522 | 521 | class AllReaderFeedbackExtensionsGroup extends AllMediawikiExtensionsGroup { |
523 | 522 | protected $label = 'ReaderFeedback'; |
— | — | @@ -546,8 +545,6 @@ |
547 | 546 | /** |
548 | 547 | * Adds a message group containing all components of the MediaWiki extension |
549 | 548 | * SocialProfile. |
550 | | - * |
551 | | - * @todo Needs documentation. |
552 | 549 | */ |
553 | 550 | class AllSocialProfileExtensionsGroup extends AllMediawikiExtensionsGroup { |
554 | 551 | protected $label = 'Social Profile'; |
— | — | @@ -582,8 +579,6 @@ |
583 | 580 | /** |
584 | 581 | * Adds a message group containing all components of the MediaWiki extension |
585 | 582 | * Translate. |
586 | | - * |
587 | | - * @todo Needs documentation. |
588 | 583 | */ |
589 | 584 | class AllTranslateExtensionsGroup extends AllMediawikiExtensionsGroup { |
590 | 585 | protected $label = 'Translate'; |
— | — | @@ -613,8 +608,6 @@ |
614 | 609 | /** |
615 | 610 | * Adds a message group containing all components of the MediaWiki extension |
616 | 611 | * Uniwiki. |
617 | | - * |
618 | | - * @todo Needs documentation. |
619 | 612 | */ |
620 | 613 | class AllUniwikiExtensionsGroup extends AllMediawikiExtensionsGroup { |
621 | 614 | protected $label = 'Uniwiki'; |
— | — | @@ -653,8 +646,6 @@ |
654 | 647 | /** |
655 | 648 | * Adds a message group containing all components of the Wikimedia Usability |
656 | 649 | * Initiative. |
657 | | - * |
658 | | - * @todo Needs documentation. |
659 | 650 | */ |
660 | 651 | class AllUsabilityInitiativeExtensionsGroup extends AllMediawikiExtensionsGroup { |
661 | 652 | protected $label = 'Usability Initiative'; |