Bugzilla – Attachment 2212 Details for
Bug 3722
Branch deletion results in incorrect message
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix
0001-Fix-for-Bug-3722-Branch-deletion-results-in-incorrec.patch (text/plain), 3.21 KB, created by
Owen Leonard
on 2010-06-03 17:38:47 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2010-06-03 17:38:47 UTC
Size:
3.21 KB
patch
obsolete
>From fbf617b9f67d4d77d796211211945d5eb54274ab Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 3 Jun 2010 13:31:58 -0400 >Subject: [PATCH] Fix for Bug 3722 - Branch deletion results in incorrect message > >A fix was submitted by Nahuel on 23 Nov 2009 and pushed, but >it combined messages for existing patrons and existing items. >This patch defines separate messages for the various cases and >corrects a typo in the original fix which left existing patrons >unreported. >--- > admin/branches.pl | 12 ++++++++++-- > .../prog/en/modules/admin/branches.tmpl | 4 +++- > 2 files changed, 13 insertions(+), 3 deletions(-) > >diff --git a/admin/branches.pl b/admin/branches.pl >index d579490..27d374e 100755 >--- a/admin/branches.pl >+++ b/admin/branches.pl >@@ -131,8 +131,16 @@ elsif ( $op eq 'delete' ) { > $sthitems->execute( $branchcode, $branchcode ); > $sthborrowers->execute( $branchcode ); > my ($totalitems) = $sthitems->fetchrow_array; >- my ($totalborrowers) = $sthitems->fetchrow_array; >- if ($totalitems or $totalborrowers) { >+ my ($totalborrowers) = $sthborrowers->fetchrow_array; >+ if ($totalitems && !$totalborrowers) { >+ $template->param( else => 1 ); >+ default("MESSAGE10", $template); >+ } >+ elsif (!$totalitems && $totalborrowers){ >+ $template->param( else => 1 ); >+ default("MESSAGE11", $template); >+ } >+ elsif ($totalitems && $totalborrowers){ > $template->param( else => 1 ); > default("MESSAGE7", $template); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tmpl >index ccd147d..aaa869c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tmpl >@@ -156,9 +156,11 @@ > <!-- TMPL_IF name="MESSAGE4" --><div class="dialog message">Library category added</div><!-- /TMPL_IF --> > <!-- TMPL_IF name="MESSAGE5" --><div class="dialog message">Library category modified</div><!-- /TMPL_IF --> > <!-- TMPL_IF name="MESSAGE6" --><div class="dialog message">Library category deleted</div><!-- /TMPL_IF --> >- <!-- TMPL_IF name="MESSAGE7" --><div class="dialog message">Library cannot be deleted because there are patrons or items using that library</div><!-- /TMPL_IF --> >+ <!-- TMPL_IF name="MESSAGE7" --><div class="dialog message">Library cannot be deleted because there are patrons and items using that library</div><!-- /TMPL_IF --> > <!-- TMPL_IF name="MESSAGE8" --><div class="dialog message">Category cannot be deleted because there are libraries using that category</div><!-- /TMPL_IF --> > <!-- TMPL_IF name="MESSAGE9" --><div class="dialog message">Category cannot be added, categorycode already exists</div><!-- /TMPL_IF --> >+ <!-- TMPL_IF name="MESSAGE10" --><div class="dialog message">Library cannot be deleted because there are items held by that library</div><!-- /TMPL_IF --> >+ <!-- TMPL_IF name="MESSAGE11" --><div class="dialog message">Library cannot be deleted because there are patrons registered at that library</div><!-- /TMPL_IF --> > <!-- TMPL_IF NAME="branches" --> > <table id="branchest"> > <thead><tr> >-- >1.7.0.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 3722
: 2212