[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/acqui acquire.pl,1.19,1.20 basket.pl,1.27,1.28
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] CVS: koha/acqui acquire.pl,1.19,1.20 basket.pl,1.27,1.28 |
Date: |
Thu, 28 Jul 2005 00:52:05 -0700 |
Update of /cvsroot/koha/koha/acqui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18438/acqui
Modified Files:
acquire.pl basket.pl
Log Message:
Implementing Independancy Branches management :
- Trying to get a basket not owned by so of his own branch leads to mainpage.
- Lists onlys ths baskets owned by someon of user's brach.
Auth.pm now sends a cookie with userenv informations.
Index: acquire.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui/acquire.pl,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** acquire.pl 14 Jul 2005 09:13:24 -0000 1.19
--- acquire.pl 28 Jul 2005 07:52:02 -0000 1.20
***************
*** 61,65 ****
$template->param($count);
my $sthtemp = $dbh->prepare("Select flags, branchcode from borrowers where
borrowernumber = ?");
! $sthtemp->execute($borrowernumber);
my ($flags, $homebranch)=$sthtemp->fetchrow;
--- 61,65 ----
$template->param($count);
my $sthtemp = $dbh->prepare("Select flags, branchcode from borrowers where
borrowernumber = ?");
! $sthtemp->execute($loggedinuser);
my ($flags, $homebranch)=$sthtemp->fetchrow;
Index: basket.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui/basket.pl,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** basket.pl 29 Jun 2005 01:16:37 -0000 1.27
--- basket.pl 28 Jul 2005 07:52:02 -0000 1.28
***************
*** 36,40 ****
my $query =new CGI;
! my $basketno = $query ->param('basket');
my $booksellerid = $query->param('supplierid');
my $order = $query->param('order');
--- 36,40 ----
my $query =new CGI;
! my $basketno = $query->param('basket');
my $booksellerid = $query->param('supplierid');
my $order = $query->param('order');
***************
*** 49,52 ****
--- 49,53 ----
my ($count,@results);
+
my $basket = getbasket($basketno);
# FIXME : the query->param('supplierid') below is probably useless. The
bookseller is always known from the basket
***************
*** 57,60 ****
--- 58,74 ----
# get librarian branch...
+ if (C4::Context->preference("IndependantBranches")) {
+ my $userenv = C4::Context->userenv;
+ unless ($userenv->{flags} == 1){
+ my $validtest = ($basket->{creationdate} = "")
+ || ($userenv->{branch} eq
$basket->{branch})
+ || ($userenv->{branch} = '')
+ || ($basket->{branch} = '');
+ unless ($validtest) {
+ print $query->redirect("../mainpage.pl");
+ exit 1;
+ }
+ }
+ }
# if new basket, pre-fill infos
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/acqui acquire.pl,1.19,1.20 basket.pl,1.27,1.28,
Henri-Damien LAURENT <=
- Prev by Date:
[Koha-cvs] CVS: koha/C4 Suggestions.pm,1.6,1.7
- Next by Date:
[Koha-cvs] CVS: koha/C4 Acquisition.pm,1.15,1.16 Auth.pm,1.42,1.43
- Previous by thread:
[Koha-cvs] CVS: koha/C4 Suggestions.pm,1.6,1.7
- Next by thread:
[Koha-cvs] CVS: koha/C4 Acquisition.pm,1.15,1.16 Auth.pm,1.42,1.43
- Index(es):