koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/members deletemem.pl,1.5,1.6 imemberentry.pl,1.1,1.


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/members deletemem.pl,1.5,1.6 imemberentry.pl,1.1,1.2 memberentry.pl,1.16,1.17 moremember.pl,1.17,1.18
Date: Wed, 26 Oct 2005 02:13:13 -0700

Update of /cvsroot/koha/koha/members
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29225/members

Modified Files:
        deletemem.pl imemberentry.pl memberentry.pl moremember.pl 
Log Message:
big commit, still breaking things...

* synch with rel_2_2. Probably the last non manual synch, as rel_2_2 should not 
be modified deeply.
* code cleaning (cleaning warnings from perl -w) continued

Index: deletemem.pl
===================================================================
RCS file: /cvsroot/koha/koha/members/deletemem.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** deletemem.pl        29 Jul 2005 16:12:53 -0000      1.5
--- deletemem.pl        26 Oct 2005 09:13:11 -0000      1.6
***************
*** 56,65 ****
  }
  my ($bor,$flags)=getpatroninformation(\%env, $member,'');
- 
  if (C4::Context->preference("IndependantBranches")) {
        my $userenv = C4::Context->userenv;
        unless ($userenv->{flags} == 1){
                unless ($userenv->{'branch'} eq $bor->{'branchcode'}){
!                       warn "user ".$userenv->{'branch'} ."borrower :". 
$bor->{'branchcode'};
                        print 
$input->redirect("/cgi-bin/koha/members/moremember.pl?bornum=$member");
                        exit 1;
--- 56,64 ----
  }
  my ($bor,$flags)=getpatroninformation(\%env, $member,'');
  if (C4::Context->preference("IndependantBranches")) {
        my $userenv = C4::Context->userenv;
        unless ($userenv->{flags} == 1){
                unless ($userenv->{'branch'} eq $bor->{'branchcode'}){
! #                     warn "user ".$userenv->{'branch'} ."borrower :". 
$bor->{'branchcode'};
                        print 
$input->redirect("/cgi-bin/koha/members/moremember.pl?bornum=$member");
                        exit 1;
***************
*** 67,71 ****
        }
  }
- 
  my $dbh = C4::Context->dbh;
  my $sth=$dbh->prepare("Select * from borrowers where guarantor=?");
--- 66,69 ----
***************
*** 74,78 ****
  $sth->finish;
  
- 
  if ($i > 0 || $flags->{'CHARGES'} ne '' || $data ne ''){
        my ($template, $borrowernumber, $cookie)
--- 72,75 ----
***************
*** 81,85 ****
                                        type => "intranet",
                                        authnotrequired => 0,
!                                       flagsrequired => {circulate => 1},
                                        debug => 1,
                                        });
--- 78,82 ----
                                        type => "intranet",
                                        authnotrequired => 0,
!                                       flagsrequired => {borrower => 1},
                                        debug => 1,
                                        });

Index: imemberentry.pl
===================================================================
RCS file: /cvsroot/koha/koha/members/imemberentry.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** imemberentry.pl     10 Mar 2004 15:13:45 -0000      1.1
--- imemberentry.pl     26 Oct 2005 09:13:11 -0000      1.2
***************
*** 27,35 ****
  use C4::Output;
  use CGI;
! use C4::Search;
  use C4::Interface::CGI::Output;
  use C4::Koha;
  use HTML::Template;
! use C4::Members;
  use C4::Date;
  
--- 27,35 ----
  use C4::Output;
  use CGI;
! use C4::Members;
  use C4::Interface::CGI::Output;
  use C4::Koha;
  use HTML::Template;
! use C4::Search;
  use C4::Date;
  

Index: memberentry.pl
===================================================================
RCS file: /cvsroot/koha/koha/members/memberentry.pl,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** memberentry.pl      9 Sep 2005 10:04:55 -0000       1.16
--- memberentry.pl      26 Oct 2005 09:13:11 -0000      1.17
***************
*** 112,116 ****
        if (C4::Context->preference("IndependantBranches")) {
                my $userenv = C4::Context->userenv;
!               if ($userenv->{flags} == 1){
                        unless ($userenv->{branch} eq $data{'branchcode'}){
                                push @errors, "ERROR_branch";
--- 112,116 ----
        if (C4::Context->preference("IndependantBranches")) {
                my $userenv = C4::Context->userenv;
!               if ($userenv->{flags} != 1){
                        unless ($userenv->{branch} eq $data{'branchcode'}){
                                push @errors, "ERROR_branch";
***************
*** 172,176 ****
                $template->param( updtype => 'M');
        }
!       my $cardnumber=C4::Members::fixup_cardnumber($data->{'cardnumber'});
        if ($data->{'sex'} eq 'F'){
                $template->param(female => 1);
--- 172,177 ----
                $template->param( updtype => 'M');
        }
!       my $cardnumber=$data->{'cardnumber'};
!       $cardnumber=fixup_cardnumber($data->{'cardnumber'}) if $actionType eq 
'Add';
        if ($data->{'sex'} eq 'F'){
                $template->param(female => 1);
***************
*** 242,260 ****
        my $default;
        foreach my $branch (keys %$branches) {
!               if (C4::Context->preference("IndependantBranches")) {
!                       my $userenv = C4::Context->userenv;
!                       if ($userenv->{flags} == 1){
!                               push @select_branch, $branch;
!                               $select_branches{$branch} = 
$branches->{$branch}->{'branchname'};
!                               $default = $data->{'branchcode'};
!                       } else {
!                               push @select_branch, $branch if ($branch eq 
$userenv->{branch});
!                               $select_branches{$branch} = 
$branches->{$branch}->{'branchname'} if ($branch eq $userenv->{branch});
!                               $default = $userenv->{branch};
!                       }
!               } else {
                        push @select_branch, $branch;
                        $select_branches{$branch} = 
$branches->{$branch}->{'branchname'};
                        $default = $data->{'branchcode'};
                }
        }
--- 243,254 ----
        my $default;
        foreach my $branch (keys %$branches) {
!               if ((not C4::Context->preference("IndependantBranches")) || 
(C4::Context->userenv->{'flags'} == 1)) {
                        push @select_branch, $branch;
                        $select_branches{$branch} = 
$branches->{$branch}->{'branchname'};
                        $default = $data->{'branchcode'};
+               } else {
+                               push @select_branch, $branch if ($branch eq 
C4::Context->userenv->{'branch'});
+                               $select_branches{$branch} = 
$branches->{$branch}->{'branchname'} if ($branch eq 
C4::Context->userenv->{'branch'});
+                               $default = C4::Context->userenv->{'branch'};
                }
        }

Index: moremember.pl
===================================================================
RCS file: /cvsroot/koha/koha/members/moremember.pl,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** moremember.pl       22 Sep 2005 10:01:46 -0000      1.17
--- moremember.pl       26 Oct 2005 09:13:11 -0000      1.18
***************
*** 129,132 ****
--- 129,135 ----
  }
  
+ #Independant branches management
+ my $unvalidlibrarian = ((C4::Context->preference("IndependantBranches")) && 
(C4::Context->userenv->{flags}!=1) && ($data->{'branchcode'} ne 
C4::Context->userenv->{branch}));
+ 
  my %bor;
  $bor{'borrowernumber'}=$bornum;
***************
*** 175,180 ****
        # charge, for that matter).
        my 
($charge,$itemtype)=calc_charges($dbh,$issue->[$i]{'itemnumber'},$bornum);
!       my $itemtypedef = getitemtypeinfo($itemtype);
!       $row{'itemtype'}=$itemtypedef->{description};
        $row{'charge'}= sprintf("%.2f",$charge);
  
--- 178,182 ----
        # charge, for that matter).
        my 
($charge,$itemtype)=calc_charges($dbh,$issue->[$i]{'itemnumber'},$bornum);
!       $row{'itemtype'}=&ItemType($itemtype);
        $row{'charge'}= sprintf("%.2f",$charge);
  
***************
*** 227,235 ****
                 totaldue =>$total,
                 issueloop       => address@hidden,
!                reserveloop     => address@hidden,
!                alertloop => $alerts);
!                independantbranches => 
C4::Context->preference("IndependantBranches"),
!                samebranch              => 
C4::Context->preference("IndependantBranches"?"":$samebranch,
!               );
  
  output_html_with_http_headers $input, $cookie, $template->output;
--- 229,234 ----
                 totaldue =>$total,
                 issueloop       => address@hidden,
!                unvalidlibrarian => $unvalidlibrarian,
!                reserveloop     => address@hidden);
  
  output_html_with_http_headers $input, $cookie, $template->output;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]