[Koha-cvs] koha/C4 Suggestions.pm [rel_2_2]

Joshua Ferraro jmf at kados.org
Tue Feb 21 21:38:42 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch: 	rel_2_2
Changes by:	Joshua Ferraro <kados at savannah.gnu.org>	06/02/21 20:38:42

Modified files:
	C4             : Suggestions.pm 

Log message:
	Take Note: I think this fixes a bug caused when independentbranches is
	turned ON and the patron is not logged in ... but I could be wrong, if
	you know how this should work, please take a look. This is in response
	to a bug report I recieved that when independentbranches was on,
	opac-suggestions.pl was 500ing.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/C4/Suggestions.pm.diff?only_with_tag=rel_2_2&tr1=1.4.2.4&tr2=1.4.2.5&r1=text&r2=text

Patches:
Index: koha/C4/Suggestions.pm
diff -u koha/C4/Suggestions.pm:1.4.2.4 koha/C4/Suggestions.pm:1.4.2.5
--- koha/C4/Suggestions.pm:1.4.2.4	Mon Jan  9 10:30:35 2006
+++ koha/C4/Suggestions.pm	Tue Feb 21 20:38:42 2006
@@ -1,6 +1,6 @@
 package C4::Suggestions;
 
-# $Id: Suggestions.pm,v 1.4.2.4 2006/01/09 10:30:35 tipaul Exp $
+# $Id: Suggestions.pm,v 1.4.2.5 2006/02/21 20:38:42 kados Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -111,9 +111,11 @@
 	}
 	if (C4::Context->preference("IndependantBranches")) {
 		my $userenv = C4::Context->userenv;
-		unless ($userenv->{flags} == 1){
+		if ($userenv) {
+		  unless ($userenv->{flags} == 1){
 			push @sql_params,$userenv->{branch};
 			$query .= " and (U1.branchcode = ? or U1.branchcode ='')";
+		  }
 		}
 	}
 	if ($suggestedbyme) {





More information about the Koha-cvs mailing list