fix unititialize value
[Pman.Base] / Pman / Roo.php
index 20d04be..d22fdae 100644 (file)
@@ -141,9 +141,9 @@ class Pman_Roo extends Pman
      *                     -- apply any query filters on data. and hide stuff not to be seen.
      *                     -- can exit by calling $roo->jerr()
      *   postListExtra($_REQUEST, $roo, $array_data) : array(extra_name => data)
-     *                     - add extra column data on the results (like new messages etc.)
+     *                     - add extra column to the jdata return key/value info.
      *   postListFilter($data, $authUser, $request) return $data
-     *                      - add extra data to an object
+     *                      - modify the returned array of data (either add stuff to the data, or remove lines etc)
      * 
      *   
      *   toRooSingleArray($authUser, $request) : array
@@ -357,6 +357,7 @@ class Pman_Roo extends Pman
         if (!empty($_REQUEST['_requestMeta']) &&  count($ret)) {
             $meta = $this->meta($x, $ret);
             if ($meta) {
+                $extra = $extra ? $extra: array();
                 $extra['metaData'] = $meta;
             }
         }
@@ -915,8 +916,7 @@ class Pman_Roo extends Pman
     
     function insert($x, $req, $with_perm_check = true)
     {
-        
-        if (method_exists($x, 'setFromRoo')) {
+         if (method_exists($x, 'setFromRoo')) {
             $res = $x->setFromRoo($req, $this);
             if (is_string($res)) {
                 $this->jerr($res);