Bugzilla – Attachment 64973 Details for
Bug 17829
Move GetMember to Koha::Patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17829: (followup) Fix small rebasing errors
Bug-17829-followup-Fix-small-rebasing-errors.patch (text/plain), 6.19 KB, created by
Tomás Cohen Arazi (tcohen)
on 2017-07-10 15:23:58 UTC
(
hide
)
Description:
Bug 17829: (followup) Fix small rebasing errors
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2017-07-10 15:23:58 UTC
Size:
6.19 KB
patch
obsolete
>From 3c8646982e9c52fdef6357508d9aab6b28e83709 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 10 Jul 2017 11:54:05 -0300 >Subject: [PATCH] Bug 17829: (followup) Fix small rebasing errors > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > members/files.pl | 7 +++-- > members/member-flags.pl | 75 +++++++++++++++++++++++++------------------------ > opac/opac-passwd.pl | 10 ++++--- > 3 files changed, 49 insertions(+), 43 deletions(-) > >diff --git a/members/files.pl b/members/files.pl >index ddb99f7..0070fcf 100755 >--- a/members/files.pl >+++ b/members/files.pl >@@ -64,6 +64,7 @@ if ( $op eq 'download' ) { > } > else { > my $patron = Koha::Patrons->find( $borrowernumber ); >+ my $patron_category = $patron->category; > $template->param(%{ $patron->unblessed}); > > my %errors; >@@ -102,7 +103,7 @@ else { > } > > $template->param( >- categoryname => $patron->category->description, >+ categoryname => $patron_category->description, > RoutingSerials => C4::Context->preference('RoutingSerials'), > ); > >@@ -116,7 +117,9 @@ else { > > $template->param( picture => 1 ) if $patron->image; > >- $template->param( adultborrower => 1 ) if ( $data->{category_type} eq 'A' || $data->{category_type} eq 'I' ); >+ $template->param( adultborrower => 1 ) >+ if ( $patron_category->category_type eq 'A' || $patron_category->category_type eq 'I' ); >+ > $template->param( > files => Koha::Patron::Files->new( borrowernumber => $borrowernumber ) > ->GetFilesInfo(), >diff --git a/members/member-flags.pl b/members/member-flags.pl >index 2b87262..e7c24e9 100755 >--- a/members/member-flags.pl >+++ b/members/member-flags.pl >@@ -30,7 +30,7 @@ my $patron = Koha::Patrons->find( $member ); > my $category_type = $patron->category->category_type; > my $bor = $patron->unblessed; > if( $category_type eq 'S' ) { >- $flagsrequired->{'staffaccess'} = 1; >+ $flagsrequired->{'staffaccess'} = 1; > } > my ($template, $loggedinuser, $cookie) = get_template_and_user({ > template_name => "members/member-flags.tt", >@@ -117,14 +117,14 @@ if ($input->param('newflags')) { > my @loop; > > while (my ($bit, $flag) = $sth->fetchrow) { >- my $checked=''; >- if ($accessflags->{$flag}) { >- $checked= 1; >- } >- >- my %row = ( bit => $bit, >- flag => $flag, >- checked => $checked, >+ my $checked=''; >+ if ($accessflags->{$flag}) { >+ $checked= 1; >+ } >+ >+ my %row = ( bit => $bit, >+ flag => $flag, >+ checked => $checked, > ); > > my @sub_perm_loop = (); >@@ -170,7 +170,7 @@ if ($input->param('newflags')) { > if ($#sub_perm_loop > -1) { > $row{sub_perm_loop} = \@sub_perm_loop; > } >- push @loop, \%row; >+ push @loop, \%row; > } > > if ( $category_type eq 'C') { >@@ -178,7 +178,7 @@ if ($input->param('newflags')) { > $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1; > $template->param( 'catcode' => $patron_categories->next ) if $patron_categories->count == 1; > } >- >+ > $template->param( adultborrower => 1 ) if ( $category_type =~ /^(A|I)$/ ); > $template->param( picture => 1 ) if $patron->image; > >@@ -191,32 +191,33 @@ if (C4::Context->preference('ExtendedPatronAttributes')) { > } > > $template->param( >- borrowernumber => $bor->{'borrowernumber'}, >- cardnumber => $bor->{'cardnumber'}, >- surname => $bor->{'surname'}, >- firstname => $bor->{'firstname'}, >- othernames => $bor->{'othernames'}, >- categorycode => $bor->{'categorycode'}, >- category_type => $category_type, >- categoryname => $bor->{'description'}, >- address => $bor->{address}, >- address2 => $bor->{'address2'}, >- streettype => $bor->{streettype}, >- city => $bor->{'city'}, >- state => $bor->{'state'}, >- zipcode => $bor->{'zipcode'}, >- country => $bor->{'country'}, >- phone => $bor->{'phone'}, >- phonepro => $bor->{'phonepro'}, >- mobile => $bor->{'mobile'}, >- email => $bor->{'email'}, >- emailpro => $bor->{'emailpro'}, >- branchcode => $bor->{'branchcode'}, >- loop => \@loop, >- is_child => ($category_type eq 'C'), >- RoutingSerials => C4::Context->preference('RoutingSerials'), >- csrf_token => Koha::Token->new->generate_csrf( { session_id => scalar $input->cookie('CGISESSID'), } ), >- ); >+ borrowernumber => $bor->{'borrowernumber'}, >+ cardnumber => $bor->{'cardnumber'}, >+ surname => $bor->{'surname'}, >+ firstname => $bor->{'firstname'}, >+ othernames => $bor->{'othernames'}, >+ categorycode => $bor->{'categorycode'}, >+ category_type => $category_type, >+ categoryname => $bor->{'description'}, >+ address => $bor->{address}, >+ address2 => $bor->{'address2'}, >+ streettype => $bor->{streettype}, >+ city => $bor->{'city'}, >+ state => $bor->{'state'}, >+ zipcode => $bor->{'zipcode'}, >+ country => $bor->{'country'}, >+ phone => $bor->{'phone'}, >+ phonepro => $bor->{'phonepro'}, >+ mobile => $bor->{'mobile'}, >+ email => $bor->{'email'}, >+ emailpro => $bor->{'emailpro'}, >+ branchcode => $bor->{'branchcode'}, >+ loop => \@loop, >+ is_child => ( $category_type eq 'C' ), >+ RoutingSerials => C4::Context->preference('RoutingSerials'), >+ csrf_token => >+ Koha::Token->new->generate_csrf( { session_id => scalar $input->cookie('CGISESSID'), } ), >+); > > output_html_with_http_headers $input, $cookie, $template->output; > >diff --git a/opac/opac-passwd.pl b/opac/opac-passwd.pl >index db63cd3..c21e124 100755 >--- a/opac/opac-passwd.pl >+++ b/opac/opac-passwd.pl >@@ -104,12 +104,14 @@ if ( C4::Context->preference("OpacPasswordChange") ) { > } > } > } >-$template->param(firstname => $patron->firstname, >- surname => $patron->surname, >- minpasslen => $minpasslen, >- passwdview => 1, >+$template->param( >+ firstname => $patron->firstname, >+ surname => $patron->surname, >+ minpasslen => $minpasslen, >+ passwdview => 1 > ); > >+ > output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 }; > > sub goodkey { >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17829
:
64872
|
64873
|
64971
|
64972
| 64973 |
64976
|
65002
|
65213
|
65286
|
65549
|
65778
|
66360
|
68634