[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Suggestions.pm,1.6,1.7
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] CVS: koha/C4 Suggestions.pm,1.6,1.7 |
Date: |
Tue, 26 Jul 2005 10:01:14 -0700 |
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14287
Modified Files:
Suggestions.pm
Log Message:
Adding branch Independancy support for searchsugestion.
Index: Suggestions.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Suggestions.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** Suggestions.pm 26 Jul 2005 07:50:27 -0000 1.6
--- Suggestions.pm 26 Jul 2005 17:01:11 -0000 1.7
***************
*** 109,112 ****
--- 109,120 ----
$query .= " and status=?";
}
+
+ if (C4::Context->preference("IndependantBranches")) {
+ my $userenv = C4::Context->userenv;
+ unless ($userenv->{flags} == 1){
+ push @sql_params,$userenv->{branch};
+ $query .= " and (U1.branchcode = ? or U1.branchcode
='')";
+ }
+ }
if ($suggestedbyme) {
if ($suggestedbyme eq -1) {
***************
*** 169,175 ****
if (C4::Context->preference("IndependantBranches")){
my $userenv = C4::Context->userenv;
! warn "IndependantBranches : Count Suggestions :
".$userenv->{branch};
! $sth = $dbh->prepare("select count(*) from
suggestions,borrowers where status=? and
borrowers.borrowernumber=suggestions.suggestedby and (borrowers.branchcode=''
or borrowers.branchcode =?)");
! $sth->execute($status,$userenv->{branch});
} else {
$sth = $dbh->prepare("select count(*) from suggestions where
status=?");
--- 177,187 ----
if (C4::Context->preference("IndependantBranches")){
my $userenv = C4::Context->userenv;
! if ($userenv->{flags} == 1){
! $sth = $dbh->prepare("select count(*) from suggestions
where status=?");
! $sth->execute($status);
! } else {
! $sth = $dbh->prepare("select count(*) from
suggestions,borrowers where status=? and
borrowers.borrowernumber=suggestions.suggestedby and (borrowers.branchcode=''
or borrowers.branchcode =?)");
! $sth->execute($status,$userenv->{branch});
! }
} else {
$sth = $dbh->prepare("select count(*) from suggestions where
status=?");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Suggestions.pm,1.6,1.7,
Henri-Damien LAURENT <=
- Prev by Date:
[Koha-cvs] CVS: koha/C4 Auth.pm,1.41,1.42 Context.pm,1.23,1.24
- Next by Date:
[Koha-cvs] CVS: koha/acqui acquire.pl,1.19,1.20 basket.pl,1.27,1.28
- Previous by thread:
[Koha-cvs] CVS: koha/C4 Auth.pm,1.41,1.42 Context.pm,1.23,1.24
- Next by thread:
[Koha-cvs] CVS: koha/acqui acquire.pl,1.19,1.20 basket.pl,1.27,1.28
- Index(es):