DataObjects/I18n.php
[Pman.Core] / DataObjects / I18n.php
index 01727ea..c85a036 100644 (file)
@@ -131,13 +131,15 @@ class Pman_Core_DataObjects_I18n extends DB_DataObject
                 i18n_translate(ltype, lkey, 'en') as lval_en
             ");
         }
+        
         if (!empty($q['_as_code_and_title'])) {
+            $tn = $this->tableName();
+            
             $this->selectAdd();
             $this->selectAdd("
                     {$tn}.lval as title,
                     {$tn}.lkey as code
             ");
-            $tn = $this->tableName();
             if (!empty($q['_title'])) {
                 $this->whereAdd("{$tn}.lval like '{$this->escape($_REQUEST['_title'])}%'");
             }