[Koha-bugs] [Bug 5010] Incomplete links in carts and lists sent from the staff client

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Apr 22 17:50:58 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5010

--- Comment #32 from M. Tompsett <mtompset at hotmail.com> ---
(In reply to Bernardo Gonzalez Kriegel from comment #31)
> Question:
> 
> On opac-sendbasket.pl you send 
> 
> if (C4::Context->preference('OPACBaseURL')){
>   $template2->param( OPACBaseURL => C4::Context->preference('OPACBaseURL') );
> }
> 
> and in virtualshelves/sendshelf.tt
> 
> [% Koha.Preference( 'OPACProtocol' ) %][% OPACBaseURL %]/cgi-bin/koha/opac...
> 
> Why not 
> 
> [% Koha.Preference('OPACProtocol') %][% Koha.Preference('OPACBaseURL') %]
> 
> ?

Because the include file requires OPACBaseURL defined for the opac ones:
$ grep -l -i opacbaseurl `find . | grep en/.*inc$`
./koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc
./koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc
./koha-tmpl/opac-tmpl/ccsr/en/includes/masthead.inc
./koha-tmpl/opac-tmpl/ccsr/en/includes/doc-head-close.inc
./koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc
$ grep -i opacbaseurl ./koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc
<link rel="unapi-server" type="application/xml" title="unAPI" href="[%
OPACBaseURL %]/cgi-bin/koha/unapi" />

This would explode into a wider scale fix required (lots more testing!). That's
beyond the scope of this bug.

I believe the second one has potential merit, but my goal was to minimize
impact without having to look for other areas affected. I have found the
OPACBaseURL logic was added by bug 6957, but I haven't looked much further.
Since I was leaving OPACBaseURL intact to minimize potential impact, accessing
the Template variable is likely faster than the Preference call and it is
shorter to type, I didn't change that. The goal of this bug is to add
OpacProtocol.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list