[dokuwiki] New changelog system

  • From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Sun, 3 Sep 2006 11:17:00 +0200

Hi Ben and interested ones!

I just took a deeper look at the new changelog system and as promised
here are my nitpicks. But first: I absolutely love it. It's really
elegant. Good work!

Here are my few minor points:

set_time_limit should be replaced by @set_time_limit to supress any
errors

I like it how the changelog conversion is implemented as action plugin.
One minor thing I'd add: the plugin should try to disable itself after
finishing the conversion. There is no need to instanciate the whole
plugin when it does nothing anymore. This of course only works if the
plugin directory is writable, so in addition the ?do=check command
should check if the import was finished but the plugin is still enabled
and issue an warning about it.

You use filectime in some places which is probably not what you want:

  "In most Unix filesystems, a file is considered changed when its inode
   data is changed"

It should be replaced with filemtime which also works on Windows
systems.

All calls to unlink() should be prefixed with an @ to suppress possible
errors. I usually do the same for file_exists to compensate for a bug in
one certain PHP version where this prints an error as well.

You're using a tab as delimiter in the changelog but don't filter the
log entries (summary) and malicious person could possibly break the
changelog by inserting newlines or tabs into the change summary. Or did
I miss something?

Okay and that's it as you can see, it's just minor things :-) Would be
great if you could send a patch for these things.

In addition we should check if there needs to be anything done on the
commandline tools in the bin directory.

Andi

Other related posts: