Pman/Roo.php
authorChris <chris@roojs.com>
Mon, 9 Sep 2013 07:55:10 +0000 (15:55 +0800)
committerChris <chris@roojs.com>
Mon, 9 Sep 2013 07:55:10 +0000 (15:55 +0800)
Pman/Roo.php

index 155c8e3..6c34d05 100644 (file)
@@ -185,19 +185,7 @@ class Pman_Roo extends Pman
             return $this->post($tab);
         }
         
-        if (isset($_REQUEST['_debug']) 
-                && 
-                $this->authUser
-                &&
-                method_exists($this->authUser,'groups') 
-                &&
-                is_a($this->authUser, 'Pman_DataObjects_Core_Person')
-                &&
-                in_array('Administrators', $this->authUser->groups('name'))
-                
-            ){
-            DB_DAtaObject::debuglevel((int)$_REQUEST['_debug']);
-        }
+        $this->checkDebug();
         
         PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($this, 'onPearError'));
    
@@ -603,9 +591,7 @@ class Pman_Roo extends Pman
    
         
         //DB_DataObject::debugLevel(1);
-        if (!empty($_REQUEST['_debug'])) {
-            DB_DataObject::debugLevel(1);
-        }
+        $this->checkDebug();
         
         if (!empty($_REQUEST['_get'])) {
             return $this->get($tab);