Bugzilla – Attachment 62501 Details for
Bug 17944
Remove the sql code from itemtypes.pl administrative perl script
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17944 - Tidied the DBIx code in itemtypes.pl
Bug-17944---Tidied-the-DBIx-code-in-itemtypespl.patch (text/plain), 1.17 KB, created by
Alex Buckley
on 2017-04-20 21:24:47 UTC
(
hide
)
Description:
Bug 17944 - Tidied the DBIx code in itemtypes.pl
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-04-20 21:24:47 UTC
Size:
1.17 KB
patch
obsolete
>From fdb7e5f5cfaa2bee461c170a1a41abeb62e07e9b Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Thu, 26 Jan 2017 15:43:04 +1300 >Subject: [PATCH] Bug 17944 - Tidied the DBIx code in itemtypes.pl > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > admin/itemtypes.pl | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > >diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl >index fd2bded..e926418 100755 >--- a/admin/itemtypes.pl >+++ b/admin/itemtypes.pl >@@ -140,13 +140,10 @@ if ( $op eq 'add_form' ) { > > } elsif ( $op eq 'delete_confirm' ) { > >- my $context = C4::Context->new; > my $schema = Koha::Database->new()->schema(); >- my $itemtotal = $schema->resultset('Item')->search({ 'itype' => $itemtype_code} ); >- my $bibliototal = $schema->resultset('Biblioitem')->search({ 'itemtype' => $itemtype_code} ); >+ my $itemtotal = $schema->resultset('Item')->search({ 'itype' => $itemtype_code})->count; >+ my $bibliototal = $schema->resultset('Biblioitem')->search({ 'itemtype' => $itemtype_code})->count; > >- $itemtotal->count; >- $bibliototal->count; > my $overalltotal = $itemtotal + $bibliototal; > > if ($overalltotal) { >-- >2.1.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 17944
:
59391
|
59564
|
59565
|
59655
|
59656
|
59657
|
59715
|
59716
|
59717
|
59718
|
59953
|
59954
|
62499
|
62500
|
62501
|
62502
|
62503
|
62504
|
62505
|
63045
|
63152
|
63220
|
63259
|
63307
|
63308
|
63309
|
63310
|
63924
|
63925