Bugzilla – Attachment 34109 Details for
Bug 13364
Add a call number browser to add item page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix patch - searching call number < MIN or > MAX
fix-patch---searching-call-number--MIN-or--MAX.patch (text/plain), 2.39 KB, created by
simith.doliveira
on 2014-12-03 20:43:02 UTC
(
hide
)
Description:
fix patch - searching call number < MIN or > MAX
Filename:
MIME Type:
Creator:
simith.doliveira
Created:
2014-12-03 20:43:02 UTC
Size:
2.39 KB
patch
obsolete
>From 2dacc1c3c1a03cb53d3add63c959d9ffac0f735f Mon Sep 17 00:00:00 2001 >From: simith <simith@inlibro.com> >Date: Wed, 3 Dec 2014 15:41:48 -0500 >Subject: [PATCH] fix patch - searching call number < MIN or > MAX > >http://bugs.koha-community.org/show_bug.cgi?id=13364 >--- > cataloguing/value_builder/cn_browser.pl | 21 +++++---------------- > 1 file changed, 5 insertions(+), 16 deletions(-) > >diff --git a/cataloguing/value_builder/cn_browser.pl b/cataloguing/value_builder/cn_browser.pl >index de4bc20..bec37e8 100755 >--- a/cataloguing/value_builder/cn_browser.pl >+++ b/cataloguing/value_builder/cn_browser.pl >@@ -105,7 +105,6 @@ sub plugin { > ORDER BY cn_sort DESC, itemnumber > LIMIT $real_limit;"; > $sth = $dbh->prepare($query); >- # die $query; > $sth->execute(); > while ( my $data = $sth->fetchrow_hashref ) { > if ($data->{itemcallnumber} eq $q) { >@@ -136,7 +135,6 @@ sub plugin { > ORDER BY cn_sort, itemnumber > LIMIT $real_limit"; > $sth = $dbh->prepare($query); >- # die $query; > $sth->execute(); > while ( my $data = $sth->fetchrow_hashref ) { > if ($data->{itemcallnumber} eq $q) { >@@ -144,14 +142,16 @@ sub plugin { > $red = 1; > } > elsif (($data->{cn_sort} gt $cn_sort_q) && !$green && !$red) { >- if ($#cn != -1) { >- push @cn, {'background' => 'green'}; >- } >+ push @cn, {'background' => 'green'}; > $green = 1; > } > push @cn, $data; > } > $rows_gt = $sth->rows; >+ if ($rows_gt == 0 && !$green && !$red){ >+ push @cn, {'background' => 'green'}; >+ } >+ > $sth->finish; > } > >@@ -159,17 +159,6 @@ sub plugin { > $template->param('cn_loop' => \@cn) if $#cn != -1; > $template->param('popup' => defined($cgi->param('popup'))); > >- # die Dumper @cn; >- >- #die $rows_lt . '-' . $rows_gt . '-' . $real_limit; >- >- my $url = "cn_browser.pl?q=$q"; >- my $first_result = $cn[0]->{itemcallnumber}; >- my $last_result = $cn[-1]->{itemcallnumber}; >- $template->param('first_result' => $first_result) if $rows_lt >= $real_limit; >- $template->param('last_result' => $last_result) if $rows_gt >= $real_limit; >- $template->param('url' => $url); >- > > output_html_with_http_headers $cgi, $cookie, $template->output; > } >-- >1.9.1
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 13364
:
34041
|
34108
|
34109
|
34476
|
34540
|
34541
|
34542
|
34543
|
34586
|
34587
|
34588
|
34589
|
35067
|
35549
|
36194
|
36235
|
36249
|
36431
|
36596
|
36597
|
36598
|
36599
|
36600
|
36601
|
36723
|
36782
|
37192
|
37193
|
37194
|
37195
|
38010
|
38011
|
38018
|
38019
|
38894