Fix #6032 - change the release index page to plain html
[Pman.Core] / DataObjects / I18n.php
index 971d0d6..ce1619a 100644 (file)
@@ -127,10 +127,24 @@ class Pman_Core_DataObjects_I18n extends DB_DataObject
             $this->buildDB(); // ensure we have the full database...
             
             $this->selectAdd("
+                id as id,
                 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
+            ");
+            $this->is_active = 1;
+            if (!empty($q['_title'])) {
+                $this->whereAdd("{$tn}.lval like '{$this->escape($_REQUEST['_title'])}%'");
+            }
+        }
          
         if (!empty($q['!code'])) {
             $this->whereAddIn('!lkey', explode(',', $q['!code']), 'string'); 
@@ -141,6 +155,10 @@ class Pman_Core_DataObjects_I18n extends DB_DataObject
             $this->whereAdd("upper(lval) LIKE '%{$v}%'");
         }
         
+         if (!empty($q['query']['name_starts'])) {
+            $this->whereAdd("lval LIKE '". $this->escape($q['query']['name_starts']). "%'");
+        }
+        
         if (!empty($q['_filtered']) && !empty($this->ltype)) {
             $cfg = $this->cfg();
             $filter = $cfg[$this->ltype];
@@ -228,7 +246,7 @@ class Pman_Core_DataObjects_I18n extends DB_DataObject
     function toTransList($ltype, $inlang)
     {
         
-        
+        $this->is_active = 1;
         $this->ltype = $ltype;
         $this->inlang= $inlang;
         $this->selectAdd();