[Maypole] bad code in custom/list template

From: Dave Howorth (dhoworth at mrc-lmb.cam.ac.uk)
Date: Tue Sep 21 2004 - 12:08:00 BST


I just happened to have the custom/list template in front of me and
noticed this code:

SET additional = additional _ "&o2=desc"
         IF col == request.query.order and request.query.o2 != "desc";

This probably won't work as expected because it is treating != as a
string comparison operator. It's not, it's a numeric operator like in
Perl. The Badger book is wrong. There was a thread on the Template list
in July with the subject 'Pass through perl?' The definitive statement
was when Chris Huegle wrote:

  [% IF 'bar' >= 'foo' %] translates to
  if ('bar' >= 'foo')

I don't have time to look at this right now. I will eventually if nobody
else has fixed it in the meantime.

Cheers, Dave Howorth

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:56 GMT