DataObjects/Core_notify_recur.php
[Pman.Core] / DataObjects / I18n.php
index 25c443a..41bff06 100644 (file)
@@ -105,6 +105,11 @@ class Pman_Core_DataObjects_I18n extends DB_DataObject
                 
             ");
         }
+        if (!empty($q['query']['name'])) {
+            //DB_DAtaObject::debugLevel(1);
+        
+            $this->whereAdd("lval LIKE '". $this->escape($q['query']['name']). "%'");
+        }
     }
     
     
@@ -126,17 +131,19 @@ class Pman_Core_DataObjects_I18n extends DB_DataObject
     function toTransList($ltype, $inlang)
     {
         
-        $x = DB_DataObject::factory('i18n');
-        $x->ltype = $ltype;
-        $x->inlang= $inlang;
-        $x->selectAdd();
-        $x->selectAdd('lkey as code, lval as title');
-        $x->find();
+        
+        $this->ltype = $ltype;
+        $this->inlang= $inlang;
+        $this->selectAdd();
+        $this->selectAdd('lkey as code, lval as title');
+        
+        $this->find();
         $ret = array();
-        while ($x->fetch()) {
+        while ($this->fetch()) {
             $ret[] = array(
-                'code' => $x->code,
-                'title' =>$x->title);
+                'code'  => $this->code,
+                'title' => $this->title
+            );
         }
         return $ret;
     }
@@ -233,7 +240,7 @@ class Pman_Core_DataObjects_I18n extends DB_DataObject
         
         $list =  $this->availableCodes($ltype);
         
-        
+        //print_r($list); 
         foreach($list as $lkey) {
             // skip ones we know we have done...
             if (in_array($lkey, $complete)) {