Bugzilla – Attachment 61714 Details for
Bug 17825
Remove C4::Members::AttributeTypes::AttributeTypeExists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17825: (followup) Remove unused function AttributeTypeExists
Bug-17825-followup-Remove-unused-function-Attribut.patch (text/plain), 2.19 KB, created by
Jonathan Druart
on 2017-03-29 20:28:02 UTC
(
hide
)
Description:
Bug 17825: (followup) Remove unused function AttributeTypeExists
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-03-29 20:28:02 UTC
Size:
2.19 KB
patch
obsolete
>From 3f373317714dcc1179aa2bf8a4ea73c1c4966a4b Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 29 Dec 2016 11:40:57 -0300 >Subject: [PATCH] Bug 17825: (followup) Remove unused function > AttributeTypeExists > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/Members/AttributeTypes.pm | 16 ---------------- > t/Members_AttributeTypes.t | 10 +--------- > 2 files changed, 1 insertion(+), 25 deletions(-) > >diff --git a/C4/Members/AttributeTypes.pm b/C4/Members/AttributeTypes.pm >index 77ba96c..bfd1494 100644 >--- a/C4/Members/AttributeTypes.pm >+++ b/C4/Members/AttributeTypes.pm >@@ -90,22 +90,6 @@ sub GetAttributeTypes_hashref { > return \%hash; > } > >-=head2 AttributeTypeExists >- >- my $have_attr_xyz = C4::Members::AttributeTypes::AttributeTypeExists($code) >- >-Returns true if we have attribute type C<$code> >-in the database. >- >-=cut >- >-sub AttributeTypeExists { >- my ($code) = @_; >- my $dbh = C4::Context->dbh; >- my $exists = $dbh->selectrow_array("SELECT code FROM borrower_attribute_types WHERE code = ?", undef, $code); >- return $exists; >-} >- > =head1 METHODS > > my $attr_type = C4::Members::AttributeTypes->new($code, $description); >diff --git a/t/Members_AttributeTypes.t b/t/Members_AttributeTypes.t >index 4b4d5a1..4721fad 100755 >--- a/t/Members_AttributeTypes.t >+++ b/t/Members_AttributeTypes.t >@@ -24,7 +24,7 @@ use Module::Load::Conditional qw/check_install/; > > BEGIN { > if ( check_install( module => 'Test::DBIx::Class' ) ) { >- plan tests => 10; >+ plan tests => 8; > } else { > plan skip_all => "Need Test::DBIx::Class" > } >@@ -74,14 +74,6 @@ is( $members_attributetypes[0]->{'class'}, > is( $members_attributetypes[1]->{'class'}, > 'silver', 'Second class value is silver' ); > >-ok( C4::Members::AttributeTypes::AttributeTypeExists('one'), >- 'checking an attribute type exists' ); >- >-ok( >- !C4::Members::AttributeTypes::AttributeTypeExists('three'), >- "checking a attribute that isn't in the code doesn't exist" >-); >- > ok( C4::Members::AttributeTypes->fetch('one'), "testing fetch feature" ); > > ok( !C4::Members::AttributeTypes->fetch('FAKE'), >-- >2.9.3
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 17825
:
58491
|
58492
|
58598
|
58599
|
61713
| 61714