Bug 13787 - Clean up noisy opac-advsearch warnings

While testing bug 10937, there were noisy warnings, which
distracted from testing the functionality of it.

Here is a snippet of the after the patch warnings:
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 384.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 161.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 161.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 177.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 177.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 202.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 202.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 240.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 240.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 256.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 256.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 356.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 356.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 369.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 369.

Tweaking the [% IF %] statements eliminated the warnings.

TEST PLAN
---------
1) Apply patch
2) Run koha qa test tools.
   -- there will be noisy warnings in the before processing, but
      there will be no such messages in the after processing.
3) git diff origin/master
   -- there should be no visible typos.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
- Applied the patch from bug 10937
- Ran "koha-qa.pl -c 1" and observed the warnings described in the
  commit message
- Applied the patch from this bug
- Ran "koha-qa.pl -c 1" again and saw no warnings
- Ran "koha-qa.pl -c 2" and saw no warnings

I have not tested the functionality of 10937 with this patch, just verified
that the changes look sensible.

This patch feels more like a followup for 10937, than a separate patch,
especially since 10937 is just "signed off" at this time. But as long as it
works...

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Mark Tompsett 2015-03-03 19:28:44 -05:00 committed by Tomas Cohen Arazi
parent dad48bcf0a
commit f71f1ba6e2

View file

@ -111,7 +111,8 @@
</div>
<div class="row-fluid">
[% IF ( ( OpacAdvSearchOptions.grep('itemtype').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('itemtype').size > 0 and expanded_options ) ) %]
[% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('itemtype').size > 0 and not expanded_options ) or
( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('itemtype').size > 0 and expanded_options ) ) %]
<div class="span12">
<div id="advsearches" class="toptabs">
<ul>
@ -145,7 +146,8 @@
[% END %]
<div class="row-fluid">
[% IF ( ( OpacAdvSearchOptions.grep('pubdate').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('pubdate').size > 0 and expanded_options ) ) %]
[% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('pubdate').size > 0 and not expanded_options ) or
( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('pubdate').size > 0 and expanded_options ) ) %]
<div class="span3">
<div id="pubrange">
<!-- PUB RANGE OPTION -->
@ -160,7 +162,8 @@
</div>
[% END %]
[% IF ( ( OpacAdvSearchOptions.grep('language').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('language').size > 0 and expanded_options ) ) %]
[% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('language').size > 0 and not expanded_options ) or
( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('language').size > 0 and expanded_options ) ) %]
<div class="span3">
<div id="langfilter">
<fieldset>
@ -185,7 +188,8 @@
</div> <!-- / .span3 -->
[% END %]
[% IF ( ( OpacAdvSearchOptions.grep('location').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('location').size > 0 and expanded_options ) ) %]
[% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('location').size > 0 and not expanded_options ) or
( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('location').size > 0 and expanded_options ) ) %]
[% UNLESS ( singleBranchMode ) %]
<div class="span3">
<!-- AVAILABILITY LIMITS -->
@ -223,7 +227,8 @@
[% END # / UNLESS singleBranchMode %]
[% END %]
[% IF ( ( OpacAdvSearchOptions.grep('sorting').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('sorting').size > 0 and expanded_options ) ) %]
[% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('sorting').size > 0 and not expanded_options ) or
( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('sorting').size > 0 and expanded_options ) ) %]
<div class="span3">
<!-- RANK LIMITS -->
<div id="sortby">
@ -240,7 +245,8 @@
[% END %]
</div> <!-- / .row-fluid -->
[% IF ( ( OpacAdvSearchOptions.grep('subtype').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('subtype').size > 0 and expanded_options ) ) %]
[% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('subtype').size > 0 and not expanded_options ) or
( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('subtype').size > 0 and expanded_options ) ) %]
<div class="row-fluid">
[% IF ( usmarc ) %]
<!-- SUBTYPE LIMITS -->
@ -340,7 +346,8 @@
[% END # / IF expanded_options %]
</div> <!-- / .row-fluid -->
[% IF ( OpacAdvSearchMoreOptions.size > 0 and expanded_options ) or ( OpacAdvSearchOptions.size > 0 and not expanded_options ) %]
[% IF ( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.size > 0 and expanded_options ) or
( OpacAdvSearchOptions and OpacAdvSearchOptions.size > 0 and not expanded_options ) %]
<div class="row-fluid">
<div class="span12">
<div class="text-center">
@ -359,7 +366,7 @@
<p>
<input class="btn btn-success" type="submit" accesskey="s" name="do" title="Search" value="Search" />
[% IF OpacAdvSearchMoreOptions.size > 0 %]
[% IF ( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.size > 0 ) %]
[% IF expanded_options %]
<a href="/cgi-bin/koha/opac-search.pl?expanded_options=0" class="btn btn-default more-less-options">Fewer options</a>
[% ELSIF not expanded_options %]