[pmwiki-users] Blocklist2 bug (was: Re: Blocklist2 ignoring EnableWhyBlocked)

David Spitzley dspitzle at wash.k12.mi.us
Tue Apr 4 07:48:16 CDT 2006


>>> "H. Fox" <haganfox at users.sourceforge.net> 04/03/06 5:37 PM >>>
On 4/3/06, David Spitzley <dspitzle at wash.k12.mi.us> wrote:
> >>> "Chris Lott" <chris.lott at gmail.com> 04/03/06 2:46 PM >>>
> On 4/2/06, David Spitzley <dspitzle at wash.k12.mi.us> wrote:
> > Ok, I've got "$EnableWhyBlocked = 1;" now, without the 1 in quotes (thanks for catching that), and I've installed your version of blocklist instead of Blocklist2.php, but I still don't get an explanation of why things are being blocked.  Any further thoughts?
>
> Don't want to insult you, but you are setting $EnableWhyBlocked = 1
> BEFORE you include the blocklist recipe in your config file right?
> That's the only way it worked for me.
> -----------------------------------------------
>
> Nope, I have it AFTER the recipe inclusion, so no insult perceived...
>
> ...Yep, that fixed it.  I need to doublecheck the recipe and see if the order is noted as being important.  Sounds like there may be a variable assignment that should be an SDV call instead in the recipe code.

SDV is (S)et (D)efault (V)alue, meaning "if this variable isn't set,
set it to this".

The order is inherently important in a situation like that.  The
reason you need to set the variable before including the script is
because the script runs when it's included, and setting the variable
after the script has already run has no effect.
----------------------------------------------------------

Well, it's working now in any case.  I've updated the Cookbook page to note that the order matters, and that the $EnableWhyBlocked line needs to go first.


David





More information about the pmwiki-users mailing list