Re: PATCH - underlaid directory for system pages
Fujio Nobori <[email protected]>
| Newsgroups | gmane.comp.web.wiki.moin.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello,
On Wed, Feb 25, 2004 at 06:48:58PM +0100, Thomas Waldmann wrote:
----snip
> > cp /some_where_you_installed/moin/share/moin/data/text/* \
> > /var/htdocs/common
>
> Well, I think it needn't be under htdocs.
Ah, right, it's better if it's not under htdocs.
> >! if config.underlay_dir:
> >! from distutils.file_util import copy_file
> > ! copy_file(page_filename,
>
> Uuh. Is there no other way than to import from distutils? OK, we use it
> for installing anyway, but I think this is the first time it is used in
> core code.
This was the easiest way I thought upon. There must be
another way. What I wanted to do was to copy the file
without modifying the timestamp.
> >+ msg = _('You can not delete this page because it is treated
> >as a base.'))
>
> "As a base?" - maybe just tell that this page is from the underlay
> directory.
It was the best word I thoght upon with my poor brain :)
> > pages = os.listdir(text_dir)
> >+ if config.underlay_dir:
> >+ # add files only in underlay_dir
> >+ underlay_pages = os.listdir(config.underlay_dir)
> >+ for file in underlay_pages:
> >+ if not (file in pages):
> >+ pages.append(file)
>
> This could make some trouble in other parts of the code. As we return
> only the names of the pages and other code might expect that all pages
> are in the data/text directory.
I could not found the code which needed the real filename.
The Page names are enough, most of the code doesn't care
about where the page exists. Of course, I could be wrong...
> Another question is what happens on searching and other functions
> accessing all pages.
Serching works beautifuly. You can see this patch work at
my site:
http://toh.no-ip.com/TohToh/
Thank you very much.
--
Fujio Nobori il|li
email: [email protected] q|@.@|p
m. ( o ) .m
~~~~~~~~~~~~~
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click