fix #8131 - chinese translations
[Pman.Core] / RooGetTrait.php
index e47155c..4815b3c 100644 (file)
@@ -107,7 +107,8 @@ trait Pman_Core_RooGetTrait {
         
         PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($this, 'onPearError'));
    
-        $tab = array_shift(explode('/', $tab));
+        $explode_tab = explode('/', $tab);
+        $tab = array_shift($explode_tab);
         
         $x = $this->dataObject($tab);
         
@@ -255,6 +256,7 @@ trait Pman_Core_RooGetTrait {
         if (!empty($_REQUEST['_requestMeta']) &&  count($ret)) {
             $meta = $this->meta($x, $ret);
             if ($meta) {
+                $extra = $extra ? $extra: array();
                 $extra['metaData'] = $meta;
             }
         }
@@ -301,6 +303,7 @@ trait Pman_Core_RooGetTrait {
             
             $cols = $x->table();
             $excols = array_keys($this->cols);
+            //print_R($excols);
             
             if (isset($x->_extra_cols)) {
                 $excols = array_merge($excols, $x->_extra_cols);
@@ -433,7 +436,7 @@ trait Pman_Core_RooGetTrait {
         $cols  = array_keys($data[0]);
      
         $options = &PEAR::getStaticProperty('DB_DataObject','options');
-        $reader = $options["ini_{$x->_database}"] .'.reader';
+        $reader = $options["ini_{$x->databaseNickname()}"] .'.reader';
         if (!file_exists( $reader )) {
             return;
         }