[dokuwiki] Re: more cleanup questions

 
> The only reason is how simple it is to change. Eg. if I want to move
> the data directory out of the webserver root for security reasons. I
> would have to change 5 or more options instead of just one.
> 
> Hmm.. what about this: We use a single config option called
> $conf['savedir']. In init.php we then use something like this:
> 
> if(!$conf['datadir']) $conf['datadir'] = $conf['savedir'].'/pages';
> if(!$conf['mediadir']) $conf['mediadir'] = $conf['savedir'].'/pages';
> ...
> 
> This way users could override single directories to their own likings
> but use a main savedir as default.

Okay I just pushed a patch containing the above solution and the following 
layout:

data/                           $conf['savedir']
|-- changes.log                 $conf['changelog']
|-- attic/                      $conf['olddir']
|-- media/                      $conf['mediadir']
|-- pages/                      $conf['datadir']
|-- meta/                       $conf['metadir']
|   `-- _htcookiesalt
|-- locks/                      $conf['lockdir']
`-- cache/                      $conf['cachedir']
    |-- 0
    |-- 1
    |-- ...
    `-- f

By default only $conf['savedir'] is defined and all other option are 
constructed from this var in init.php

Andi

Other related posts: