On Thu, Mar 07, 2002 at 09:23:02PM +0100, Sander Striker wrote: >... > > > >>> server/core.c:661 > > > >>> AP_DECLARE(const char *) ap_document_root(request_rec *r) /* > > Don't > > > use this! */ > > > >>> > > > >>> If we shouldn't use it, why is it still here? >... > > Having looked at the code now. MO is, yes they are legit. The code > > reaches into a core private structure to grab the conf->document_root > > variable. I don't want modules doing that themselves. > > So the /* don't use this! */ comment should go?
I would say rewrite it to be something like: Modules shouldn't be worried about the document root. If you need to call this function, then you should ask yourself "why". Modules should be more concerned with r->uri and r->filename. Cheers, -g -- Greg Stein, http://www.lyra.org/