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)
This commit is contained in:
Raphael Wimmer
2016-03-04 16:05:06 +01:00
parent 545aa832c0
commit f8bce7e30b

View File

@ -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;