diff --git a/action.php b/action.php index 8b2297e..7c7a2a9 100755 --- a/action.php +++ b/action.php @@ -61,17 +61,23 @@ function register(&$controller) { */ function cleanup(&$event, $param) { global $conf; - $onlySmall = $this->getConf('autoclearonlysmall'); - $onlyNoComment = $this->getConf('autoclearonlynocomment'); - if ($this->run) return; - $this->run = true; - $hdl = plugin_load('admin','clearhistory'); + + if ($this->run) return; + $this->run = true; + echo 'clearhistory: started'.NL; + + $onlySmall = $this->getConf('autoclearonlysmall'); + $onlyNoComment = $this->getConf('autoclearonlynocomment'); + + //$hdl = plugin_load('admin','clearhistory'); $hdl = new admin_plugin_clearhistory(); - $hdl->_scanRecents($onlySmall , $onlyNoComment); + + $hdl->_scanRecents(30, $onlySmall , $onlyNoComment); + + echo 'clearhistory: ' . $hdl->delcounter . ' deleted'.NL; touch($conf['cachedir'].'/lastclean'); } - } diff --git a/admin.php b/admin.php index 20fed3e..52efff1 100755 --- a/admin.php +++ b/admin.php @@ -11,7 +11,7 @@ /** * This plugin is used to cleanup the history * - * @see http://dokuwiki.org/plugin:clearhistory + * @see http://dokuwiki.org/plugin:clearhistory * @author Dominik Eckelmann */ class admin_plugin_clearhistory extends DokuWiki_Admin_Plugin {