Author: sevein
Date: Tue May  1 14:37:09 2012
New Revision: 11584

Log:
Update ES i18n helper to set i18n docs properly for nested objects

Modified:
   branches/2.0/lib/helper/QubitHelper.php

Modified: branches/2.0/lib/helper/QubitHelper.php
==============================================================================
--- branches/2.0/lib/helper/QubitHelper.php     Tue May  1 14:36:25 2012        
(r11583)
+++ branches/2.0/lib/helper/QubitHelper.php     Tue May  1 14:37:09 2012        
(r11584)
@@ -173,9 +173,19 @@
   {
     foreach ($objects as $item)
     {
-      foreach ($doc[$item] as $i18n)
+      if (!isset($doc[$item]))
       {
-        $doc[$item][$i18n['culture']] = $i18n;
+        continue;
+      }
+
+      foreach ($doc[$item] as $key => $value)
+      {
+        foreach ($value['i18n'] as $i18n)
+        {
+          $doc[$item][$i18n['culture']] = $value;
+        }
+
+        unset($doc[$item][$key]);
       }
     }
   }

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to