Bugzilla – Attachment 81433 Details for
Bug 21704
Editing subfields in bibliographic frameworks is broken (TT filter)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21704: (follow-up) Remove unused 'frameworkcode' template param
Bug-21704-follow-up-Remove-unused-frameworkcode-te.patch (text/plain), 4.50 KB, created by
Katrin Fischer
on 2018-10-28 22:09:36 UTC
(
hide
)
Description:
Bug 21704: (follow-up) Remove unused 'frameworkcode' template param
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-10-28 22:09:36 UTC
Size:
4.50 KB
patch
obsolete
>From 04858dd0dd7f8472ad1ef77dda46d346a2ce31d9 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Sun, 28 Oct 2018 09:56:17 -0300 >Subject: [PATCH] Bug 21704: (follow-up) Remove unused 'frameworkcode' template > param > >This patch removes the 'frameworkcode' template parameter. Now the >'framework' object is passed, and everytime the frameworkcode is needed >on the template, framework.frameworkcode is called. > >To test: >- Apply this patch >- Run: > $ grep ' frameworkcode ' koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >=> SUCCESS: There's no use of 'frameworkcode' in the template >- Sign off :-D > >Signed-off-by: Michal Denar <black23@gmail.com> > >Signed-off-by: Michal Denar <black23@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > admin/marctagstructure.pl | 22 +++++++--------------- > .../prog/en/modules/admin/marctagstructure.tt | 2 +- > 2 files changed, 8 insertions(+), 16 deletions(-) > >diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl >index e42ce4fa48..ba9ea33f70 100755 >--- a/admin/marctagstructure.pl >+++ b/admin/marctagstructure.pl >@@ -109,8 +109,7 @@ if ($op eq 'add_form') { > mandatory => $data->{'mandatory'}, > authorised_value => $data->{authorised_value}, > ind1_defaultvalue => $data->{'ind1_defaultvalue'}, >- ind2_defaultvalue => $data->{'ind2_defaultvalue'}, >- frameworkcode => $frameworkcode, >+ ind2_defaultvalue => $data->{'ind2_defaultvalue'} > ); # FIXME: move checkboxes to presentation layer > # END $OP eq ADD_FORM > ################## ADD_VALIDATE ################################## >@@ -168,8 +167,7 @@ if ($op eq 'add_form') { > my $data = $sth->fetchrow_hashref; > $template->param( > liblibrarian => $data->{'liblibrarian'}, >- searchfield => $searchfield, >- frameworkcode => $frameworkcode, >+ searchfield => $searchfield > ); > # END $OP eq DELETE_CONFIRM > ################## DELETE_CONFIRMED ################################## >@@ -183,10 +181,7 @@ if ($op eq 'add_form') { > $cache->clear_from_cache("MarcStructure-1-$frameworkcode"); > $cache->clear_from_cache("default_value_for_mod_marc-"); > $cache->clear_from_cache("MarcSubfieldStructure-$frameworkcode"); >- $template->param( >- searchfield => $searchfield, >- frameworkcode => $frameworkcode, >- ); >+ $template->param( searchfield => $searchfield ); > # END $OP eq DELETE_CONFIRMED > ################## ITEMTYPE_CREATE ################################## > # called automatically if an unexisting frameworkis selected >@@ -202,9 +197,8 @@ if ($op eq 'add_form') { > }; > } > } >- $template->param(existingframeworkloop => \@existingframeworkloop, >- frameworkcode => $frameworkcode, >- ); >+ $template->param( existingframeworkloop => \@existingframeworkloop ); >+ > ################## DEFAULT ################################## > } else { # DEFAULT > # here, $op can be unset or set to "framework_create_confirm". >@@ -300,15 +294,13 @@ if ($op eq 'add_form') { > $template->param(isprevpage => $offset, > prevpage=> $offset-$pagesize, > searchfield => $searchfield, >- script_name => $script_name, >- frameworkcode => $frameworkcode, >+ script_name => $script_name > ); > } > if ($offset+$pagesize<$cnt) { > $template->param(nextpage =>$offset+$pagesize, > searchfield => $searchfield, >- script_name => $script_name, >- frameworkcode => $frameworkcode, >+ script_name => $script_name > ); > } > } #---- END $OP eq DEFAULT >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >index 1910451ff5..8d21ec534e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >@@ -131,7 +131,7 @@ > <form action="[% script_name | html %]" method="post"> > <input type="hidden" name="op" value="framework_create_confirm" /> > <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" /> >- Create framework for [% frameworkcode | html %] ([% framework.frameworktext | html %]) using >+ Create framework for [% framework.frameworkcode | html %] ([% framework.frameworktext | html %]) using > <select name="existingframeworkcode"> > <option value="">Default</option> > [% FOREACH existingframeworkloo IN existingframeworkloop %] >-- >2.11.0
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 21704
:
81405
|
81407
|
81428
|
81429
|
81432
| 81433 |
81434