From f8bce7e30b9baf601ebaff951ffe5317536530fd Mon Sep 17 00:00:00 2001 From: Raphael Wimmer Date: Fri, 4 Mar 2016 16:05:06 +0100 Subject: [PATCH] Actually process (most of) the log file instead The current code stops log file analysis if $size-$pos is larger than the amount of lines (* 150 characters) to process in one run. This leads to only the first $lines being processed if a log file is larger than $lines * 150 bytes (which is usually the case). Changing the 'greater than' sign to a 'smaller than' sign fixes this issue. (However, the plugin will still nearly never analyze the most recent entries) --- helper/log.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helper/log.php b/helper/log.php index a3600fc..882a884 100644 --- a/helper/log.php +++ b/helper/log.php @@ -57,7 +57,7 @@ class helper_plugin_statdisplay_log extends DokuWiki_Plugin { $pos = 0; if(isset($this->logdata['_logpos'])) $pos = $this->logdata['_logpos']; if($pos > $size) $pos = 0; - if($pos && ( ($size - $pos) > ($this->getConf('lines') * 150) )) return 0; // we want to have some minimal log data + if($pos && ( ($size - $pos) < ($this->getConf('lines') * 150) )) return 0; // we want to have some minimal log data if(!$this->lock()) return 0;