修复Action 500错误

This commit is contained in:
Kokororin 2016-11-20 16:57:01 +08:00
parent e06456b29d
commit 49078288de

View File

@ -4,14 +4,14 @@ class Access_Action implements Widget_Interface_Do
private $response;
private $request;
private $extend;
private $access;
public function __construct()
{
$this->response = Typecho_Response::getInstance();
$this->request = Typecho_Request::getInstance();
require_once __DIR__ . '/Access.php';
$this->extend = new Access_Extend();
require_once __DIR__ . '/Access_Bootstrap.php';
$this->access = new Access_Core();
}
public function execute()
@ -51,7 +51,7 @@ class Access_Action implements Widget_Interface_Do
if (!is_array($data)) {
throw new Exception('params invalid');
}
$this->extend->deleteLogs($data);
$this->access->deleteLogs($data);
exit(Json::encode(array(
'code' => 0,
)));
@ -66,7 +66,7 @@ class Access_Action implements Widget_Interface_Do
protected function checkAuth()
{
if (!$this->extend->isAdmin()) {
if (!$this->access->isAdmin()) {
throw new Exception('Access Denied');
}
}