cosmocode / dokuwiki-plugin-logstats

temporary fork of the DokuWiki logstats plugin
1 stars 6 forks source link

relative path wrong behaviour #1

Open bitozoid opened 11 years ago

bitozoid commented 11 years ago

The parameter accesslog works fine for absolute paths and for filenames only, but does not work for relative paths in the form: mydir/myfile.log.

It makes the io_savefile call dependant on the current working directory, and cwd is different for media and for pages.

splitbrain commented 11 years ago

relative paths should be resolved relative to the data/meta/ directory

bitozoid commented 11 years ago

If the directory exists relative to the cwd (is_dir($dir)), then it does not get written to meta.

175         $dir = dirname($this->getConf('accesslog'));
176         $log = basename($this->getConf('accesslog'));
177         if($dir == '.' || $dir == '' || !is_dir($dir)){
178             $dir = fullpath($conf['metadir'].'/'.$dir);
179         }