Hi Jane,

This needs work - please see below:

On Wed, Apr 29, 2009 at 3:30 PM, Jane Wagner <[email protected]> wrote:
> diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl 
> b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl
> index a102457..5897f86 100644
> --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl
> +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl
> @@ -76,9 +76,10 @@ function tagAdded() {
>                );
>                return false;
>            });
> +       <!-- TMPL_IF NAME="opacuserlogin" --><!-- TMPL_IF 
> NAME="RequestOnOpac" -->
>         $(".holdsep").text("| ");
>         $(".hold").text("Place Hold");
> -
> +       <!-- /TMPL_IF -->

This change and the others like it in the other templates adds two
TMPL_IFs but only one closing /TMPL_IF - this is a guaranteed template
error.

> index 154d8af..29ec6a9 100755
> --- a/opac/opac-basket.pl
> +++ b/opac/opac-basket.pl
> @@ -54,8 +54,11 @@ if (C4::Context->preference('TagsEnabled')) {
>                C4::Context->preference($_) and $template->param($_ => 1);
>        }
>  }
> -
> -
> +# adding the $RequestOnOpac param
> +my $RequestOnOpac;
> +if (C4::Context->preference("RequestOnOpac")) {
> +        $RequestOnOpac = 1;
> +}
>  foreach my $biblionumber ( @bibs ) {
>     $template->param( biblionumber => $biblionumber );

This change and the other ones like it are in the odd situation of
being unnecessary but also not doing what you intended.  It's not
necessary because the RequestOnOpac syspref is one of the ones that's
automatically passed to $template for OPAC scripts (see line 343 of
C4/Auth.pm), but it also doesn't do what you intended because it only
sets a $RequestOnOpac variable without also calling $template->param()
to actually expose it to the template.

Regards,

Galen
-- 
Galen Charlton
VP, Research & Development, LibLime
[email protected]
p: 1-888-564-2457 x709
skype: gmcharlt
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to