Fixed loading of language categories
authorMarcel Werk <burntime@woltlab.com>
Thu, 14 Feb 2013 17:05:56 +0000 (18:05 +0100)
committerMarcel Werk <burntime@woltlab.com>
Thu, 14 Feb 2013 17:05:56 +0000 (18:05 +0100)
wcfsetup/install/files/lib/data/language/Language.class.php

index 928c1ff8f1fa4c9340628f7999443d18c8302d36..40f60fc56d3fd6f7b53d8bac371c1004b0884754 100644 (file)
@@ -92,10 +92,10 @@ class Language extends DatabaseObject {
                        }
                        
                        // attempt to load the most specific category
-                       if (isset($explodedItem[3])) {
-                               $this->loadCategory($explodedItem[0].'.'.$explodedItem[1].'.'.$explodedItem[2]);
+                       $this->loadCategory($explodedItem[0].'.'.$explodedItem[1].'.'.$explodedItem[2]);
+                       if (!isset($this->items[$item])) {
+                               $this->loadCategory($explodedItem[0].'.'.$explodedItem[1]);
                        }
-                       $this->loadCategory($explodedItem[0].'.'.$explodedItem[1]);
                }
                
                // return language variable