DataObjects/I18n.php
authorAlan Knowles <alan@roojs.com>
Mon, 15 Apr 2019 06:38:16 +0000 (14:38 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 15 Apr 2019 06:38:16 +0000 (14:38 +0800)
DataObjects/I18n.php

index 4d45cd7..01727ea 100644 (file)
@@ -131,12 +131,13 @@ class Pman_Core_DataObjects_I18n extends DB_DataObject
                 i18n_translate(ltype, lkey, 'en') as lval_en
             ");
         }
-         if (!empty($q['_as_code_and_title'])) {
+        if (!empty($q['_as_code_and_title'])) {
             $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'])}%'");
             }