[Koha-bugs] [Bug 10626] Remove doubled up TT plugins

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jul 24 08:26:20 CEST 2013


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

--- Comment #5 from Chris Cormack <chris at bigballofwax.co.nz> ---
Comment on attachment 19870
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19870
Bug 10626 - Remove doubled up TT plugins - Merge KohaBranchName and Branches

Review of attachment 19870:
 --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=10626&attachment=19870)
-----------------------------------------------------------------

::: Koha/Template/Plugin/Branches.pm
@@ +32,4 @@
>      my $sth   = C4::Context->dbh->prepare($query);
>      $sth->execute($branchcode);
>      my $b = $sth->fetchrow_hashref();
> +    return $b ? encode( 'UTF-8', $b->{'branchname'} ) : q{};

By switching our templates to use this plugin, instead of KohaBranchName.pm we
have changed the behaviour.

We are now not using the GetBranchName subroutine, but instead doing a db query
ourselves (which is probably better we shouldnt be using C4:: modules in the
Koha:: space) but we are also doing this encode.

And I am not convinced encode is what we should be doing here. Could you please
explain why we are doing the encode?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list