From cf97a9de1ee95cd7bbfacb6845d62c990cb5e26e Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 15 Sep 2011 12:14:09 +0800 Subject: [PATCH] DataObjects/I18n.php --- DataObjects/I18n.php | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/DataObjects/I18n.php b/DataObjects/I18n.php index 489e2168..f4b09af2 100644 --- a/DataObjects/I18n.php +++ b/DataObjects/I18n.php @@ -88,38 +88,13 @@ class Pman_Core_DataObjects_I18n extends DB_DataObject $x->find(); $ret = array(); while ($x->fetch()) { - $ret[] = array('code' => $x->code, 'title' =>$x->title); - } - - } - - function objToList($type, $obj) { - $ret = array(); - - - foreach($this->cfg[$type] as $k) { - $sub = false; - - if (strpos($k, '_') !== false) { - $bits = explode('_', $k); - $k = array_shift($bits); - $sub = array_shift($bits); - } - $v = $k == '**' ? 'Other' : $obj->getName($k); - - if ($sub) { - $v .= ' ('.$sub.')'; - } - $ret[] = array( - 'code'=> ($type=='l' ? strtolower($k) : strtoupper($k)) . ($sub ? '_'.strtoupper($sub) : ''), - 'title' => $v - ); + 'code' => $x->code, + 'title' =>$x->title); } - return $ret; + } - - + -- 2.39.2