diff --git a/Action.php b/Action.php
index ba7d71b..59b5989 100644
--- a/Action.php
+++ b/Action.php
@@ -1,4 +1,6 @@
response = Typecho_Response::getInstance();
$this->request = Typecho_Request::getInstance();
- require_once __DIR__ . '/Access_Autoloader.php';
- Access_Autoloader::register();
$this->access = new Access_Core();
}
@@ -27,7 +27,9 @@ class Access_Action implements Widget_Interface_Do
{
$image = base64_decode('R0lGODlhAQABAIAAAAAAAP///yH5BAQUAP8ALAAAAAABAAEAAAICRAEAOw==');
$this->response->setContentType('image/gif');
- $this->access->writeLogs(null, $this->request->u, $this->request->cid, $this->request->mid);
+ if ($this->access->config->writeType == 1) {
+ $this->access->writeLogs(null, $this->request->u, $this->request->cid, $this->request->mid);
+ }
echo $image;
}
diff --git a/Plugin.php b/Plugin.php
index eef729d..f631dc5 100644
--- a/Plugin.php
+++ b/Plugin.php
@@ -74,7 +74,7 @@ class Access_Plugin implements Typecho_Plugin_Interface
'writeType', array(
'0' => '后端',
'1' => '前端',
- ), '0', '日志写入类型:', '请选择日志写入类型,数据量大时(几万以上),后端写入可能会拖慢博客访问速度');
+ ), '0', '日志写入类型:', '请选择日志写入类型,如果写入速度较慢可选择前端写入日志。
如果您使用了pjax,请在pjax相关事件中调用 window.Access.track() 方法。');
$canAnalytize = new Typecho_Widget_Helper_Form_Element_Radio(
'canAnalytize', array(
'0' => '不允许',
@@ -197,8 +197,7 @@ class Access_Plugin implements Typecho_Plugin_Interface
$index = rtrim(Helper::options()->index, '/');
$access = new Access_Core();
$parsedArchive = $access->parseArchive($archive);
- // TODO 兼容pjax
- echo "";
+ echo "";
}
}