[pmwiki-users] Page Store path definition

Petko Yotov 5ko at 5ko.fr
Wed Nov 25 06:20:43 CST 2009


On Wednesday 25 November 2009 10:31:31 Simon wrote:
> I am using the following code to share files in a group from
> http://pmwiki.org/wiki/Cookbook/SharedPages-Talk

Well, this section seems to have been written by you -- you might try to 
contact the author... :-)

> viz
> <?php if (!defined('PmWiki')) exit(); ## Songs.php
> ## only alter the directories when a page is posted in this group
> if (@$_REQUEST['action']=='edit'
>  && preg_grep('/^post/', array_keys($_REQUEST) ) ) {
>   $LockFile = "/home/tahi/public_html/pmwiki/wikishared.d/.flock";
>   $WikiDir = new
> PageStore('/home/tahi/public_html/pmwiki/wikishared.d/$Group/$FullName',
> 1); # writeable shared group
>   $WikiLibDirs = array(  &$WikiDir,
>     new PageStore('wiki.d/$Group/$FullName', 1), # per group subdirectories
>     new PageStore('$FarmD/wikilib.d/$FullName')  );
> }

Always use $FarmD/wikilib.d and $FarmD/wikishared.d including for the .flock 
file and not /home/.../wikishared.d.

  LockFile = "$FarmD/wikishared.d/.flock";
  $WikiDir = new PageStore('$FarmD/wikishared.d/$Group/$FullName', 1);
  # what you have next should work fine

Petko



More information about the pmwiki-users mailing list