[pmwiki-users] Re: Problem with URLapprove

Patrick R. Michaud pmichaud at pobox.com
Mon Jun 13 16:25:50 CDT 2005


On Mon, Jun 13, 2005 at 10:28:13PM +0200, chr at home.se wrote:
> After some more testing, the problem is probably that my configuration is 
> a bit too advanced...
> 
> I'm aiming for a wiki farm with a shared field, where this field should
> contain the list of approved URL's. 
> [...]  Oh, oh... if I modify WritePage(), I'd also have to worry about
> the locking mechanism, right?  Two fields might be writing to the same
> shared page at once...  maybe this is hopless...

Oh, I don't think it's so hopeless.  The urlapprove.php script uses
PostPage() to make changes to the approvals page (so that page history
is preserved), and PostPage() always writes to the storage area 
given by $WikiDir.  Thus, all you really need to do is set $WikiDir 
to point to the farm wiki.d whenever making a change to the url 
approvals page -- same as what you're doing for other edits in 'Site':

    # approve urls into shared page directory
    if ($action == 'approvesites' || $action == 'approveurls') 
      { $WikiDir = new PageStore("$FarmD/shared.d/\$FullName"); }

Pm



More information about the pmwiki-users mailing list