http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11848
--- Comment #5 from M. Tompsett <mtomp...@hotmail.com> --- Comment on attachment 25664 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=25664 Bug 11848: Move language detection function in C4::Languages Review of attachment 25664: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=11848&attachment=25664) ----------------------------------------------------------------- ::: C4/Context.pm @@ +1252,5 @@ > > +sub interface { > + my ($class, $interface) = @_; > + > + if (defined $interface) { You are using interface as both a get and set, correct? @@ +1253,5 @@ > +sub interface { > + my ($class, $interface) = @_; > + > + if (defined $interface) { > + $interface ||= 'opac'; Why not // instead? Also, interface is defined. This line is pointless. @@ +1254,5 @@ > + my ($class, $interface) = @_; > + > + if (defined $interface) { > + $interface ||= 'opac'; > + $context->{interface} = $interface; perhaps a lc or uc may be useful? maybe some validation of the value? @@ +1257,5 @@ > + $interface ||= 'opac'; > + $context->{interface} = $interface; > + } > + > + return $context->{interface}; What if you haven't set the interface and you get undef? It would seem the default assumption is 'opac'. Perhaps add a "// 'opac'"? -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/