Index: trunk/extensions/Translate/Groups.php |
— | — | @@ -605,7 +605,7 @@ |
606 | 606 | if ( !isset( $this->groups ) ) { |
607 | 607 | $groups = array(); |
608 | 608 | $ids = (array) $this->conf['GROUPS']; |
609 | | - $ids = $this->expandWildcards( $ids ); |
| 609 | + $ids = MessageGroups::expandWildcards( $ids ); |
610 | 610 | |
611 | 611 | foreach ( $ids as $id ) { |
612 | 612 | // Do not try to include self and go to infinite loop. |
— | — | @@ -632,38 +632,6 @@ |
633 | 633 | return $this->groups; |
634 | 634 | } |
635 | 635 | |
636 | | - /** |
637 | | - * If the list of group ids contains wildcards, this function will match |
638 | | - * them against the list of all supported groups and return matched group |
639 | | - * names. |
640 | | - * @param $ids \list{String} |
641 | | - * @return \list{String} |
642 | | - */ |
643 | | - protected function expandWildcards( $ids ) { |
644 | | - $hasWild = false; |
645 | | - |
646 | | - foreach ( $ids as $id ) { |
647 | | - if ( strpos( $id, '*' ) !== false ) { |
648 | | - $hasWild = true; |
649 | | - break; |
650 | | - } |
651 | | - } |
652 | | - |
653 | | - if ( !$hasWild ) { |
654 | | - return $ids; |
655 | | - } |
656 | | - |
657 | | - $matcher = new StringMatcher( '', $ids ); |
658 | | - $all = array(); |
659 | | - |
660 | | - foreach ( MessageGroups::singleton()->getGroups() as $id => $_ ) { |
661 | | - if ( $matcher->match( $id ) ) { |
662 | | - $all[] = $id; |
663 | | - } |
664 | | - } |
665 | | - return $all; |
666 | | - } |
667 | | - |
668 | 636 | protected function loadMessagesFromCache( $groups ) { |
669 | 637 | $messages = array(); |
670 | 638 | foreach ( $groups as $group ) { |