[Koha-patches] [PATCH] Modified log reporting to allow multiple modules to be selected.

Galen Charlton galen.charlton at liblime.com
Thu Apr 23 21:21:27 CEST 2009


Hi David,

On Thu, Apr 23, 2009 at 2:43 PM, David Goldfein
<d.goldfein at lacrosse.lib.wi.us> wrote:
> Change select to make it XHTML compliant
>
> multiple changed to multiple="multiple"
> ---

I'm getting some error messages in my Apace log when I run this.

[Thu Apr 23 14:11:32 2009] [error] [client 74.179.117.85] EXPR:at pos
6: non-initialized variable module, referer:
http://staff-gmc.dev.kohalibrary.com/cgi-bin/koha/tools/viewlog.pl
[Thu Apr 23 14:11:32 2009] [error] [client 74.179.117.85] EXPR:at pos
6: non-initialized variable module, referer:
http://staff-gmc.dev.kohalibrary.com/cgi-bin/koha/tools/viewlog.pl
[Thu Apr 23 14:11:32 2009] [error] [client 74.179.117.85] EXPR:at pos
6: non-initialized variable module, referer:
http://staff-gmc.dev.kohalibrary.com/cgi-bin/koha/tools/viewlog.pl

These are were actually present before your patch, but since you're in
the area...

[Thu Apr 23 14:11:32 2009] [error] [client 74.179.117.85]
HTML::Template::Pro:in  TMPL_IF at pos 8271:end tag:found S instead of
> at pos 8301, referer:
http://staff-gmc.dev.kohalibrary.com/cgi-bin/koha/tools/viewlog.pl

This last one is new, and likely indicates an unbalanced TMPL_IF.

> +               <select name="modules" id="modules" multiple="multiple">
>                            <option value="" selected="selected">All</option>

It would be nice if, after you select some modules and do a search, if
the same modules were selected when the page is redrawn.

> +                                                   <!-- TMPL_IF EXPR="module eq 'MEMBERS'"-->

As you can see, TMPL_IF EXPR can lead to noise in the Apache log
because it requires that all variables used in the expression to be
present and set in the $template.  Therefore, instead of using TMPL_IF
EXPR, you should do something like this in the code:

$template->("module$_" => 1) for each @$modules;

and this in the tempalte

<!-- TMPL_IF NAME="moduleMEMBERS" -->

Regards,

Galen
-- 
Galen Charlton
VP, Research & Development, LibLime
galen.charlton at liblime.com
p: 1-888-564-2457 x709
skype: gmcharlt



More information about the Koha-patches mailing list