[Koha-patches] [PATCH] Bug 1542, fixing filter by area in reports dictionary

Galen Charlton galen.charlton at liblime.com
Wed May 13 16:03:29 CEST 2009


Hi Chris,

This patch needs work - please revise and resubmit.  It doesn't
actually fix the bug - you need to pass $areas to
get_from_dictionary() to get it to actually filter - and it introduces
an XHTML validation error.

Regards,

Galen

On Wed, May 13, 2009 at 3:46 AM, Chris Cormack <chris at bigballofwax.co.nz> wrote:
> ---
>  .../prog/en/modules/reports/dictionary.tmpl        |    3 ++-
>  reports/dictionary.pl                              |    3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl
> index 9e21732..80e6712 100644
> --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl
> +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl
> @@ -24,13 +24,14 @@
>  <!-- TMPL_IF NAME="definitions" -->
>  <h2>Current Terms</h2>
>  <form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
> +<input type="hidden" name="phase" value="View Dictionary">
>  Filter by area <select name="areas">
>  <option value="All">All</option>
>  <!-- TMPL_LOOP NAME="areas" -->
>  <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
>  <!-- /TMPL_LOOP -->
>  </select>
> -<input name="phase" value="Go" type="submit" />
> +<input name="submit" value="Go" type="submit" />
>  </form>
>  <br />
>  <table border="1" cellspacing="0" cellpadding="5">
> diff --git a/reports/dictionary.pl b/reports/dictionary.pl
> index 09104c3..8a57200 100755
> --- a/reports/dictionary.pl
> +++ b/reports/dictionary.pl
> @@ -18,6 +18,7 @@
>  # Suite 330, Boston, MA  02111-1307 USA
>  use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
>  use strict;
> +use warnings;
>  use C4::Auth;
>  use CGI;
>  use C4::Output;
> @@ -38,7 +39,7 @@ Script to control the guided report creation
>  my $input = new CGI;
>  my $referer = $input->referer();
>
> -my $phase = $input->param('phase');
> +my $phase = $input->param('phase') || 'View Dictionary';
>  my $no_html = 0; # this will be set if we dont want to print out an html::template
>  my     ( $template, $borrowernumber, $cookie ) = get_template_and_user(
>     {
> --
> 1.5.6.3
>
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha.org
> http://lists.koha.org/mailman/listinfo/koha-patches
>



-- 
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