예제 #1
0
 /**
  * Execute a call, extends parent method
  *
  * Checks for authentication first
  */
 function call($methodname, $args)
 {
     if (!in_array($methodname, $this->public_methods) && !$this->checkAuth()) {
         return new IXR_Error(-32603, 'server error. not authorized to call method "' . $methodname . '".');
     }
     return parent::call($methodname, $args);
 }
예제 #2
0
 /**
  * Execute a call, extends parent method
  *
  * Checks for authentication first
  */
 function call($methodname, $args)
 {
     if (!in_array($methodname, $this->public_methods) && !$this->checkAuth()) {
         if (!isset($_SERVER['REMOTE_USER'])) {
             header('HTTP/1.1 401 Unauthorized');
         } else {
             header('HTTP/1.1 403 Forbidden');
         }
         return new IXR_Error(-32603, 'server error. not authorized to call method "' . $methodname . '".');
     }
     return parent::call($methodname, $args);
 }