Permalink
Browse files

auto-cleanup is now working correctly

  • Loading branch information...
1 parent bd94655 commit 062ba3b9b5f276025603cd23c17e61740d15bf63 @dom-mel dom-mel committed Jan 23, 2010
Showing with 14 additions and 8 deletions.
  1. +13 −7 action.php
  2. +1 −1 admin.php
View
20 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');
}
-
}
View
2 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 <deckelmann@gmail.com>
*/
class admin_plugin_clearhistory extends DokuWiki_Admin_Plugin {

0 comments on commit 062ba3b

Please sign in to comment.