[Koha-cvs] koha/C4 Koha.pm [rel_2_2]
Ryan Higgins
rch at liblime.com
Thu Apr 19 07:04:16 CEST 2007
CVSROOT: /sources/koha
Module name: koha
Branch: rel_2_2
Changes by: Ryan Higgins <rych> 07/04/19 05:04:16
Modified files:
C4 : Koha.pm
Log message:
in getbranch(), if branch unknown, take it from userenv, instead of first-defined. this will set branch to users registration branch if not explicitly set.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Koha.pm?cvsroot=koha&only_with_tag=rel_2_2&r1=1.22.2.7&r2=1.22.2.8
Patches:
Index: Koha.pm
===================================================================
RCS file: /sources/koha/koha/C4/Koha.pm,v
retrieving revision 1.22.2.7
retrieving revision 1.22.2.8
diff -u -b -r1.22.2.7 -r1.22.2.8
--- Koha.pm 12 Jan 2007 14:19:06 -0000 1.22.2.7
+++ Koha.pm 19 Apr 2007 05:04:16 -0000 1.22.2.8
@@ -514,12 +514,15 @@
}
return (\%printers);
}
+
sub getbranch ($$) {
my($query, $branches) = @_; # get branch for this query from branches
my $branch = $query->param('branch');
($branch) || ($branch = $query->cookie('branch'));
+ ($branches->{$branch}) || ( $branch = C4::Context->userenv->{'branch'} );
($branches->{$branch}) || ($branch=(keys %$branches)[0]);
- return $branch;
+
+return $branch;
}
sub getprinter ($$) {
More information about the Koha-cvs
mailing list