1<?php
2/**
3 * Plugin usecounter
4 */
5
6if (!defined('DOKU_INC')) {
7    die();
8}
9if (!defined('DOKU_PLUGIN')) {
10    define('DOKU_PLUGIN', DOKU_INC.'lib/plugins/');
11}
12require_once(DOKU_PLUGIN.'action.php');
13
14class action_plugin_usecounter extends DokuWiki_Action_Plugin {
15
16    /* @var helper_plugin_fields $helper */
17    var $helper = null;
18
19    function __construct() {
20        $this->helper = plugin_load('helper','usecounter');
21    }
22    public function register(Doku_Event_Handler $controller) {
23        $controller->register_hook('RENDERER_CONTENT_POSTPROCESS', 'AFTER', $this, '_resetUseCounter');
24    }
25
26    public function _resetUseCounter(&$event, $param) {
27        $this->helper->resetUseCounter();
28	}
29}
30