Bugzilla – Attachment 43530 Details for
Bug 13632
Make permission descriptions translatable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 13632: Do not use userflags.flagdesc and permissions.description
SIGNED-OFF-Bug-13632-Do-not-use-userflagsflagdesc-.patch (text/plain), 3.32 KB, created by
Kyle M Hall (khall)
on 2015-10-16 15:31:44 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 13632: Do not use userflags.flagdesc and permissions.description
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-10-16 15:31:44 UTC
Size:
3.32 KB
patch
obsolete
>From 4deb1a2e851f8c535392e9a07c2c165576e301ca Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 22 Sep 2015 09:48:27 +0100 >Subject: [PATCH] [SIGNED-OFF] Bug 13632: Do not use userflags.flagdesc and permissions.description > >These 2 fields are not used anymore, but we want to keep them anyway. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Auth.pm | 4 ++-- > members/member-flags.pl | 9 +++------ > 2 files changed, 5 insertions(+), 8 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index ef0c585..bf1a045 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -1902,14 +1902,14 @@ of the subpermission. > > sub get_all_subpermissions { > my $dbh = C4::Context->dbh; >- my $sth = $dbh->prepare( "SELECT flag, code, description >+ my $sth = $dbh->prepare( "SELECT flag, code > FROM permissions > JOIN userflags ON (module_bit = bit)" ); > $sth->execute(); > > my $all_perms = {}; > while ( my $perm = $sth->fetchrow_hashref ) { >- $all_perms->{ $perm->{'flag'} }->{ $perm->{'code'} } = $perm->{'description'}; >+ $all_perms->{ $perm->{'flag'} }->{ $perm->{'code'} } = 1; > } > return $all_perms; > } >diff --git a/members/member-flags.pl b/members/member-flags.pl >index 68c52aa..1206f12 100755 >--- a/members/member-flags.pl >+++ b/members/member-flags.pl >@@ -89,10 +89,10 @@ if ($input->param('newflags')) { > my $dbh=C4::Context->dbh(); > my $all_perms = get_all_subpermissions(); > my $user_perms = get_user_subpermissions($bor->{'userid'}); >- my $sth=$dbh->prepare("SELECT bit,flag,flagdesc FROM userflags ORDER BY bit"); >+ my $sth=$dbh->prepare("SELECT bit, flag FROM userflags ORDER BY bit"); > $sth->execute; > my @loop; >- while (my ($bit, $flag, $flagdesc) = $sth->fetchrow) { >+ while (my ($bit, $flag) = $sth->fetchrow) { > my $checked=''; > if ($accessflags->{$flag}) { > $checked= 1; >@@ -101,7 +101,7 @@ if ($input->param('newflags')) { > my %row = ( bit => $bit, > flag => $flag, > checked => $checked, >- flagdesc => $flagdesc ); >+ ); > > my @sub_perm_loop = (); > my $expand_parent = 0; >@@ -113,7 +113,6 @@ if ($input->param('newflags')) { > id => "${flag}_$sub_perm", > perm => "$flag:$sub_perm", > code => $sub_perm, >- description => $all_perms->{$flag}->{$sub_perm}, > checked => 1 > }; > } >@@ -127,7 +126,6 @@ if ($input->param('newflags')) { > id => "${flag}_$sub_perm", > perm => "$flag:$sub_perm", > code => $sub_perm, >- description => $all_perms->{$flag}->{$sub_perm}, > checked => 1 > }; > } >@@ -139,7 +137,6 @@ if ($input->param('newflags')) { > id => "${flag}_$sub_perm", > perm => "$flag:$sub_perm", > code => $sub_perm, >- description => $all_perms->{$flag}->{$sub_perm}, > checked => 0 > } unless exists $user_perms->{$flag} and exists $user_perms->{$flag}->{$sub_perm}; > } >-- >1.7.2.5
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 13632
:
35569
|
35595
|
35761
|
35776
|
42756
|
42757
|
42758
|
42759
|
42760
|
43528
|
43529
|
43530
|
43531
|
43532
|
43561
|
43562
|
43563
|
43564
|
43565
|
43566
|
43599