[pmwiki-users] Blocklist2 and Site

Patrick R. Michaud pmichaud at pobox.com
Thu Jul 21 10:26:19 CDT 2005


On Thu, Jul 21, 2005 at 09:56:08AM -0400, Crisses wrote:
> 
> On Jul 20, 2005, at 3:15 AM, Simon wrote:
> 
> >http://pmwiki.org/wiki/Cookbook/Blocklist2
> >From b49 would it be possible to change Main.Blocklist
> >to Site.BlockList   (note case too)
> 
> I suppose I would have to work on that -- but first I would have to  
> upgrade or at least work from an upgraded pmwiki.php -- I think I'd  
> have to retain the Blocklist2 page/script as it stands, for older  
> installations...

It seems like it ought to be easily possible to one script that 
can handle earlier PmWiki 2 versions.  The original blocklist.php 
script I had ended up working with both PmWiki 1 and PmWiki 2, which 
have a lot more differences between them.  :-)

At any rate, I cast my vote in favor of just one Blocklist recipe.

> Patrick -- how stable are the changes you've implemented so far, as  
> far as me changing the Main.Blocklist to Site.BlockList 

Those part of the changes should be quite stable.  I recommend 
initializing $BlocklistPages in the recipe as follows:

    if (!isset($BlocklistPages)) {
      $BlocklistPages = array('Site.Blocklist');
      if (PageExists('Main.Blocklist')) $BlocklistPages[] = 'Main.Blocklist';
    }

That should handle upgrades for a while.  Eventually we can remove
the Main.Blocklist check from the recipe as more sites are migrated
over.

And, FWIW, I seem to prefer "Blocklist" over "BlockList".  I tend
to see it written in other contexts as a single word rather than
two words (c.f. "blacklist").

Pm




More information about the pmwiki-users mailing list