[pmwiki-users] Pagelist definition problem (fixed?)
Crisses
crisses at kinhost.org
Fri Oct 6 15:10:56 CDT 2006
On Oct 6, 2006, at 12:38 PM, Patrick R. Michaud wrote:
> On Fri, Oct 06, 2006 at 11:18:22AM -0500, Patrick R. Michaud wrote:
>> On Fri, Oct 06, 2006 at 10:52:56AM -0400, Crisses wrote:
>>> I get a list in the right format, but the part I want to group on
>>> just repeats:
>>>
>>> http://similepedia.com/index.php/Category/Period-20thCentury
>>> http://similepedia.com/index.php/Category/Publisher-PenguinBooks
>>
>> ******ICK!*******
>>
>> I found part of the problem, and it's ugly.
>>
>> It's the 'and' in "Of Mice and Men" that is messing things up.
>> The complex expression parser doesn't (yet?) recognize quotes --
>> it just separates things based on the predefined operators
>>
>> && || ( ) ! and or xor
>>
>> So, since {$:Work} contains the string ' and ', it's being treated
>> as an operator in the complex expression and breaking the expression.
>
> A short-term workaround might be to eliminate and/or/xor from
> complex conditional expressions. Try the following in local/
> config.php:
>
> $CondExprOps = '&&|\\|\\||[!()]';
>
> Then (:if expr ... :) will separate things only on
> &&, ||, !, and parens.
WOW -- that broke things real nice ;)
Nah, that won't work. I'd have to scrub through FASTData etc. and
see what's wrong, or maybe it's my custom code somewhere... -- but
the problem isn't that it's parsing "and" -- it's that it's
evaluating the variables BEFORE changing "and" to && in the code.
Why not take if statements and search/replace the shorthand with &&
before parsing the page variables?
Like I noted that Caveman (I think) used "eq" in a statement. I
stopped by Perl a few years before discovering PHP and forgot
everything I knew about Perl in favor of PHP -- So I use && || etc.
Not everyone -- not even every cookbook author -- does.
Crisses
More information about the pmwiki-users
mailing list