http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72111

Revision: 72111
Author:   nikerabbit
Date:     2010-09-01 16:09:55 +0000 (Wed, 01 Sep 2010)

Log Message:
-----------
Add transition time support for old style groups to AggregateMessageGroup

Modified Paths:
--------------
    trunk/extensions/Translate/Groups.php

Modified: trunk/extensions/Translate/Groups.php
===================================================================
--- trunk/extensions/Translate/Groups.php       2010-09-01 15:32:28 UTC (rev 
72110)
+++ trunk/extensions/Translate/Groups.php       2010-09-01 16:09:55 UTC (rev 
72111)
@@ -490,9 +490,7 @@
                        $ids = (array) $this->conf['GROUPS'];
 
                        foreach ( $ids as $id ) {
-                               /**
-                                * Do not try to include self and go to 
infinite loop.
-                                */
+                               // Do not try to include self and go to 
infinite loop.
                                if ( $id === $this->getId() ) {
                                        continue;
                                }
@@ -502,7 +500,7 @@
                                        error_log( "Invalid group id in 
{$this->getId()}: $id" );
                                        continue;
                                }
-                               $groups[$id] =  $group;
+                               $groups[$id] = $group;
                        }
                        $this->groups = $groups;
                }
@@ -513,8 +511,13 @@
                $messages = array();
                foreach ( $this->getGroups() as $group ) {
                        $cache = new MessageGroupCache( $group );
-                       foreach ( $cache->getKeys() as $key ) {
-                               $messages[$key] = $cache->get( $key );
+                       if ( $cache->exists() ) {
+                               foreach ( $cache->getKeys() as $key ) {
+                                       $messages[$key] = $cache->get( $key );
+                               }
+                       } else {
+                               // BC for MessageGroupOld
+                               $messages = wfArrayMerge( $messages, 
$group->load( 'en' ) );
                        }
                }
 



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to