forked from splitbrain/dokuwiki-plugin-statistics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
log.php
38 lines (30 loc) · 948 Bytes
/
log.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* Statistics plugin - data logger
*
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Andreas Gohr <[email protected]>
*/
if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__) . '/../../../') . '/');
define('DOKU_DISABLE_GZIP_OUTPUT', 1);
require_once(DOKU_INC . 'inc/init.php');
session_write_close();
// all features are brokered by the helper plugin
/** @var helper_plugin_statistics $plugin */
$plugin = plugin_load('helper', 'statistics');
dbglog('Log ' . $_SERVER['REQUEST_URI']);
switch($_REQUEST['do']) {
case 'v':
$plugin->Logger()->log_access();
$plugin->Logger()->log_session(1);
break;
/** @noinspection PhpMissingBreakStatementInspection */
case 'o':
$plugin->Logger()->log_outgoing();
//falltrough
default:
$plugin->Logger()->log_session();
}
// fixme move to top
$plugin->sendGIF();
//Setup VIM: ex: et ts=4 :