[dokuwiki] Re: Recent changes & import update
- From: Guy Brand <gb@xxxxxxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Tue, 24 Oct 2006 00:01:18 +0200
On 23 October at 11:30, Ben Coburn wrote:
> I'll look into changing the code for importing the old changelog so
> that it puts all the old changes into the recent changes cache. The
> changelog trimmer (in the indexer) will then cut the recent changes
> cache down to size on the first run. This will also give people a whole
> 24 hours to set $conf['recent_days'] to the "right" value for their
> wiki.
Hmmm, seems I forgot the action of the trimmer which will shrink the
cache anyway. I don't think having 24 hours to change recent_days is
a user (or admin) friendly solution. So here is an other scenario to
keep at least 20 (or whatever $conf['recent'] value is set to)
entries after importing the changes.
From the existing changes.log which gets imported, we can determine
which value of $conf['recent_days'] would be required to output at
least $conf['recent'] entries in the changelog by reading the entry
on the $conf['recent'] line before last line in changes.log. In a
shell way, with $conf['recent'] = 20, this is:
~$ tail -20 www/current3/data/changes.log | head -1 | cut -f1
1148070072
so $conf['recent_days'] should be (`date +%s` - 1148070072)/36400
which is 372 days! Thus I'd see importchangelog plugin store this
value in its lib/plugins/importoldchangelog dir if $conf['recent']
is not set (i.e. defaults to a value of 7 days) and the trimmer use
this value as long as $conf['recent'] has not been set in local.php
config file. People who have changed $conf['recent'] already did it
because their wiki changes a lot or rarely.
We could even go a step further and decide that if the calculated
$conf['recent_days'] (needed to have $conf['recent'] entries in the
changes cache) and the (default) value set for $conf['recent_days']
in the config differ too much, the trimmer uses the calculated value
stored by importoldchangelog in the lib/plugins/... dir. But this is
maybe too invasive.
What do you think?
--
bug
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- Follow-Ups:
- [dokuwiki] Re: Recent changes & import update
- From: Ben Coburn
- References:
- [dokuwiki] Re: Recent changes broken
- From: Chris Smith
- [dokuwiki] Re: Recent changes broken
- From: Guy Brand
- [dokuwiki] Re: Recent changes broken
- From: Ben Coburn
- [dokuwiki] Re: Recent changes broken
- From: Guy Brand
- [dokuwiki] Re: Recent changes broken
- From: Anika Henke
- [dokuwiki] Re: Recent changes broken
- From: Ben Coburn
- [dokuwiki] Re: Recent changes broken
- From: Anika Henke
- [dokuwiki] Re: Recent changes broken
- From: Guy Brand
- [dokuwiki] Re: Recent changes broken
- From: Andreas Gohr
- [dokuwiki] Re: Recent changes & import update
- From: Ben Coburn
Other related posts:
- » [dokuwiki] Re: Recent changes & import update
- » [dokuwiki] Re: Recent changes & import update
- » [dokuwiki] Re: Recent changes & import update
- » [dokuwiki] Re: Recent changes & import update
- » [dokuwiki] Re: Recent changes & import update
- » [dokuwiki] Re: Recent changes & import update
- [dokuwiki] Re: Recent changes & import update
- From: Ben Coburn
- [dokuwiki] Re: Recent changes broken
- From: Chris Smith
- [dokuwiki] Re: Recent changes broken
- From: Guy Brand
- [dokuwiki] Re: Recent changes broken
- From: Ben Coburn
- [dokuwiki] Re: Recent changes broken
- From: Guy Brand
- [dokuwiki] Re: Recent changes broken
- From: Anika Henke
- [dokuwiki] Re: Recent changes broken
- From: Ben Coburn
- [dokuwiki] Re: Recent changes broken
- From: Anika Henke
- [dokuwiki] Re: Recent changes broken
- From: Guy Brand
- [dokuwiki] Re: Recent changes broken
- From: Andreas Gohr
- [dokuwiki] Re: Recent changes & import update
- From: Ben Coburn