Pman/Roo.php
authorAlan Knowles <alan@akbkhome.com>
Thu, 19 Jan 2012 08:23:51 +0000 (16:23 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 19 Jan 2012 08:23:51 +0000 (16:23 +0800)
Pman/Roo.php

index 496db54..1187fb4 100644 (file)
@@ -606,11 +606,14 @@ class Pman_Roo extends Pman
             $this->jerr("PERMISSION DENIED");
         }
         
-        $m = method_exists($x, 'toRooSingleArray') ? 'toRooSingleArray' : false;
-        $m = !$m && method_exists($x, 'toRooArray') ? 'toRooArray' : $m;
-        $m = $m ? $m : 'toArray';
+        if (method_exists($x, 'toRooSingleArray')) {
+            $this->jok($this->toRooSingleArray($au, $req));
+        }
+        if (method_exists($x, 'toRooArray')) {
+            $this->jok($this->toRooArray($req));
+        }
         
-        $this->jok($m == 'toArray' ? $x->toArray() : $x->$m($this->authUser, $req) );
+        $this->jok($x->toArray());
         
         
     }