2008/7/14 Patrick R. Michaud <[EMAIL PROTECTED]>:
> I don't know if you've looked at the Markup() code, but getting the '<lib'
> stuff to work the same way that Markup() does it is a _real_ pain.
> I'd hate to re-implement it all over again just for PageStores, or to
> try to refactor Markup() and PageStore to use a common code library
> for this.  (I.e., that approach is much more work than I want.)
>
> I might try a lighter version of it, though, that doesn't do all
> of the just-in-time calculation that Markup() and BuildMarkupRules()
> currently do.  For compatibility reasons, though, I think we need
> to keep $WikiLibDirs essentially the same as it is now, and just
> provide a function to make it easier to manipulate $WikiLibDirs.

How about changing the $WikiLibDirs declaration to the following:

  $WikiLibDirs = array(
    10 => &$WikiDir,
    100 => new PageStore('$FarmD/wikilib.d/{$FullName}')
  );

and adding

  if (IsEnabled($EnableSortWikiLibDirs,0)) ksort($WikiLibDirs);

after the config files have been read?

This would allow for example

  $WikiLibDirs[5] = new CustomPageStore(...);
  $WikiLibDirs[20] = new OtherPageStore(...);
  $EnableSortWikiLibDirs = 1;


eemeli

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to