DataObjects/I18n.php
authorAlan Knowles <alan@roojs.com>
Wed, 14 Dec 2011 06:26:17 +0000 (14:26 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 14 Dec 2011 06:26:17 +0000 (14:26 +0800)
DataObjects/I18n.php

index 25c443a..e9b2385 100644 (file)
@@ -126,17 +126,18 @@ 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;
     }