Bugzilla – Attachment 35232 Details for
Bug 11944
Cleanup Koha UTF-8
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11944: Some refresh don't indicate the charset to use
Bug-11944-Some-refresh-dont-indicate-the-charset-t.patch (text/plain), 12.10 KB, created by
Jonathan Druart
on 2015-01-14 15:43:19 UTC
(
hide
)
Description:
Bug 11944: Some refresh don't indicate the charset to use
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-01-14 15:43:19 UTC
Size:
12.10 KB
patch
obsolete
>From 75f0cc57717397dc5d56418d7c9bddbd58f192e1 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 3 Apr 2014 15:54:30 +0200 >Subject: [PATCH] Bug 11944: Some refresh don't indicate the charset to use > >This patch replaces occurrences of META HTTP-EQUIV=Refresh with a >redirection. > >Note: > The list of modified files has been got with the following grep: > git grep Content-Type | grep -v -i utf | grep Refresh | grep -v translator | grep -v \.js > >Test plan: >1) admin/auth_tag_structure.pl >- Go on an authority MARC framework for an authority type >(admin/auth_tag_structure.pl?authtypecode=CO for instance) >- Click on the "Add a new tag" button >- Fill fields >- Save >- You should be redirected on the auth_tag_structure.pl page >- Try to modify an existing tag >- The redirection should be done > >2) admin/auth_subfields_structure.pl >- From the previous page, click on a "subfields" link >- Edit/Add a new subfields >- Save >- You should be redirected to the subfield list >- Delete a subfield >- You should be redirected to the subfield list > >3) admin/authorised_values.pl >- Add/Edit an authorised value >- Save >- You should be redirected to the authorised value list (with the > right category selected) > >4) admin/categorie.pl >- Add/Edit a patron category >- Save >- You should be redirected to the category list >- Delete a patron category >- You should be redirected to the category list > >5) admin/koha2marclinks.pl >- Go on the Koha to MARC mapping configuration page >- Edit a field >- Map a field and click on "OK" >- You should be redirected to the list > >6) admin/marc_subfields_structure.pl >- Go on the MARC frameworks page >- Click on "MARC structure" for one on the list >- Click on "Subfields" for one on the list >- Add/Edit a subfield >- Save >- You should be redirected to the subfield list > >7) admin/systempreferences.pl >- Go on the system preferences admin page >- Click on the "Local use" tab >- Add/Edit a pref >- Save >- You shold be redirected to the Local use preference list > >8) serials/subscription-detail.pl >- Go on a subscription detail page >- Delete the subscription (using Edit > Delete subscription) >- You should be redirected on the serials home page > >Signed-off-by: Paola Rossi <paola.rossi@cineca.it> >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org> > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> >--- > admin/auth_subfields_structure.pl | 9 ++++----- > admin/auth_tag_structure.pl | 5 +++-- > admin/authorised_values.pl | 11 ++++++----- > admin/categorie.pl | 5 ++--- > admin/koha2marclinks.pl | 3 +-- > admin/marc_subfields_structure.pl | 7 ++----- > admin/marctagstructure.pl | 4 ++-- > admin/systempreferences.pl | 2 +- > serials/subscription-detail.pl | 4 ++-- > 9 files changed, 23 insertions(+), 27 deletions(-) > >diff --git a/admin/auth_subfields_structure.pl b/admin/auth_subfields_structure.pl >index 96088bd..0376a0f 100755 >--- a/admin/auth_subfields_structure.pl >+++ b/admin/auth_subfields_structure.pl >@@ -348,8 +348,8 @@ if ($op eq 'add_form') { > } > } > } >- print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=auth_subfields_structure.pl?tagfield=$tagfield&authtypecode=$authtypecode\"></html>"; >- exit; >+ print $input->redirect("/cgi-bin/koha/admin/auth_subfields_structure.pl?tagfield=$tagfield&authtypecode=$authtypecode"); >+ exit; > > # END $OP eq ADD_VALIDATE > ################## DELETE_CONFIRM ################################## >@@ -373,9 +373,8 @@ if ($op eq 'add_form') { > my $sth=$dbh->prepare("delete from auth_subfield_structure where tagfield=? and tagsubfield=? and authtypecode=?"); > $sth->execute($tagfield,$tagsubfield,$authtypecode); > } >- print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=auth_subfields_structure.pl?tagfield=$tagfield&authtypecode=$authtypecode\"></html>"; >- exit; >- $template->param(tagfield => $tagfield); >+ print $input->redirect("/cgi-bin/koha/admin/auth_subfields_structure.pl?tagfield=$tagfield&authtypecode=$authtypecode"); >+ exit; > # END $OP eq DELETE_CONFIRMED > ################## DEFAULT ################################## > } else { # DEFAULT >diff --git a/admin/auth_tag_structure.pl b/admin/auth_tag_structure.pl >index faf0727..bd9ed32 100755 >--- a/admin/auth_tag_structure.pl >+++ b/admin/auth_tag_structure.pl >@@ -158,7 +158,7 @@ if ($op eq 'add_form') { > ); > } > } >- print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=auth_tag_structure.pl?searchfield=".$input->param('tagfield')."&authtypecode=$authtypecode\">"; >+ print $input->redirect("/cgi-bin/koha/admin/auth_tag_structure.pl?searchfield=$tagfield&authtypecode=$authtypecode"); > exit; > # END $OP eq ADD_VALIDATE > ################## DELETE_CONFIRM ################################## >@@ -181,7 +181,8 @@ if ($op eq 'add_form') { > my $sth = $dbh->prepare("delete from auth_subfield_structure where tagfield=? and authtypecode=?"); > $sth->execute($searchfield,$authtypecode); > } >- print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=auth_tag_structure.pl?searchfield=".$input->param('tagfield')."&authtypecode=$authtypecode\">"; >+ my $tagfield = $input->param('tagfield'); >+ print $input->redirect("/cgi-bin/koha/admin/auth_tag_structure.pl?searchfield=$tagfield&authtypecode=$authtypecode"); > exit; > # END $OP eq DELETE_CONFIRMED > ################## ITEMTYPE_CREATE ################################## >diff --git a/admin/authorised_values.pl b/admin/authorised_values.pl >index 35afaca..090fe90 100755 >--- a/admin/authorised_values.pl >+++ b/admin/authorised_values.pl >@@ -162,7 +162,7 @@ if ($op eq 'add_form') { > } > } > $sth->finish; >- print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=authorised_values.pl?searchfield=".$new_category."&offset=$offset\"></html>"; >+ print $input->redirect("/cgi-bin/koha/admin/authorised_values.pl?searchfield=$new_category&offset=$offset"); > exit; > } > } >@@ -192,8 +192,9 @@ if ($op eq 'add_form') { > $sth->execute($id, $branchcode); > } > } >- print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=authorised_values.pl?searchfield=".$input->param('category')."&offset=$offset\"></html>"; >- exit; >+ my $category = $input->param('category'); >+ print $input->redirect("/cgi-bin/koha/admin/authorised_values.pl?searchfield=$category&offset=$offset"); >+ exit; > } > } > if ( $duplicate_entry ) { >@@ -224,8 +225,8 @@ if ($op eq 'add_form') { > my $id = $input->param('id'); > my $sth=$dbh->prepare("delete from authorised_values where id=?"); > $sth->execute($id); >- print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=authorised_values.pl?searchfield=$searchfield&offset=$offset\"></html>"; >- exit; >+ print $input->redirect("/cgi-bin/koha/admin/authorised_values.pl?searchfield=$searchfield&offset=$offset"); >+ exit; > # END $OP eq DELETE_CONFIRMED > ################## DEFAULT ################################## > } else { # DEFAULT >diff --git a/admin/categorie.pl b/admin/categorie.pl >index 1b4ad85..8fb5c64 100755 >--- a/admin/categorie.pl >+++ b/admin/categorie.pl >@@ -267,8 +267,7 @@ elsif ( $op eq 'add_validate' ) { > C4::Form::MessagingPreferences::handle_form_action( $input, > { categorycode => $input->param('categorycode') }, $template ); > } >- >- print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=categorie.pl\"></html>"; >+ print $input->redirect("/cgi-bin/koha/admin/categorie.pl"); > exit; > > # END $OP eq ADD_VALIDATE >@@ -305,7 +304,7 @@ elsif ( $op eq 'delete_confirmed' ) { > $sth->execute($categorycode); > $sth->finish; > >- print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=categorie.pl\"></html>"; >+ print $input->redirect("/cgi-bin/koha/admin/categorie.pl"); > exit; > > # END $OP eq DELETE_CONFIRMED >diff --git a/admin/koha2marclinks.pl b/admin/koha2marclinks.pl >index 145a0f8..8458ad5 100755 >--- a/admin/koha2marclinks.pl >+++ b/admin/koha2marclinks.pl >@@ -116,8 +116,7 @@ elsif ( $op eq 'add_validate' ) { > # We could get a list of all frameworks and do them one-by-one, or zap > # everything. > $cache->flush_all(); >- print >-"Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=koha2marclinks.pl?tablename=$tablename\"></html>"; >+ print $input->redirect("/cgi-bin/koha/admin/koha2marclinks.pl?tablename=$tablename"); > exit; > > # END $OP eq ADD_VALIDATE >diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl >index 44a9494..9c23196 100755 >--- a/admin/marc_subfields_structure.pl >+++ b/admin/marc_subfields_structure.pl >@@ -428,8 +428,7 @@ elsif ( $op eq 'add_validate' ) { > $cache->clear_from_cache("MarcStructure-0-$frameworkcode"); > $cache->clear_from_cache("MarcStructure-1-$frameworkcode"); > >- print >-"Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=marc_subfields_structure.pl?tagfield=$tagfield&frameworkcode=$frameworkcode\"></html>"; >+ print $input->redirect("/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=$tagfield&frameworkcode=$frameworkcode"); > exit; > > # END $OP eq ADD_VALIDATE >@@ -471,10 +470,8 @@ elsif ( $op eq 'delete_confirmed' ) { > } > $cache->clear_from_cache("MarcStructure-0-$frameworkcode"); > $cache->clear_from_cache("MarcStructure-1-$frameworkcode"); >- print >-"Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=marc_subfields_structure.pl?tagfield=$tagfield&frameworkcode=$frameworkcode\"></html>"; >+ print $input->redirect("/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=$tagfield&frameworkcode=$frameworkcode"); > exit; >- $template->param( tagfield => $tagfield ); > > # END $OP eq DELETE_CONFIRMED > ################## DEFAULT ################################## >diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl >index 21395c2..d195718 100755 >--- a/admin/marctagstructure.pl >+++ b/admin/marctagstructure.pl >@@ -164,9 +164,9 @@ if ($op eq 'add_form') { > } > $cache->clear_from_cache("MarcStructure-0-$frameworkcode"); > $cache->clear_from_cache("MarcStructure-1-$frameworkcode"); >- } >+ } > print $input->redirect("/cgi-bin/koha/admin/marctagstructure.pl?searchfield=$tagfield&frameworkcode=$frameworkcode"); >- exit; >+ exit; > # END $OP eq ADD_VALIDATE > ################## DELETE_CONFIRM ################################## > # called by default form, used to confirm deletion of data in DB >diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl >index f41fe76..1ac1b72 100755 >--- a/admin/systempreferences.pl >+++ b/admin/systempreferences.pl >@@ -357,7 +357,7 @@ if ( $op eq 'add_form' ) { > logaction( 'SYSTEMPREFERENCE', 'ADD', undef, $input->param('variable') . " | " . $value ); > } > } >- print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=systempreferences.pl?tab=\"></html>"; >+ print $input->redirect("/cgi-bin/koha/admin/systempreferences.pl?tab="); > exit; > ################## DELETE_CONFIRM ################################## > # called by default form, used to confirm deletion of data in DB >diff --git a/serials/subscription-detail.pl b/serials/subscription-detail.pl >index 7296e2e..a3186cb 100755 >--- a/serials/subscription-detail.pl >+++ b/serials/subscription-detail.pl >@@ -88,8 +88,8 @@ if ($op eq 'del') { > # If it's ok to delete the subscription, we do so > if ($issueconfirmed eq "1") { > &DelSubscription($subscriptionid); >- print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=serials-home.pl\"></html>"; >- exit; >+ print $query->redirect("/cgi-bin/koha/serials/serials-home.pl"); >+ exit; > } > } > my $hasRouting = check_routing($subscriptionid); >-- >2.1.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 11944
:
26364
|
26365
|
26366
|
26367
|
26368
|
26369
|
26370
|
26371
|
26372
|
26407
|
26408
|
26409
|
26737
|
26738
|
26739
|
26740
|
26741
|
26742
|
26743
|
26744
|
26745
|
26746
|
26747
|
26748
|
26794
|
26857
|
26858
|
26859
|
26860
|
26861
|
26862
|
26863
|
26864
|
26865
|
26866
|
26867
|
26868
|
26869
|
26870
|
26871
|
26895
|
26921
|
27021
|
27080
|
27094
|
27158
|
27159
|
27161
|
27193
|
27194
|
27195
|
27196
|
27198
|
27199
|
27200
|
27201
|
27202
|
27203
|
27204
|
27205
|
27206
|
27207
|
27208
|
27209
|
27210
|
27211
|
27212
|
27213
|
27214
|
27215
|
27216
|
27585
|
27586
|
27587
|
27588
|
27589
|
27590
|
27591
|
27592
|
27593
|
27594
|
27595
|
27596
|
27597
|
27598
|
27599
|
27600
|
27601
|
27602
|
27603
|
27880
|
27881
|
27882
|
27883
|
27884
|
27885
|
27886
|
27887
|
27888
|
27889
|
27890
|
27891
|
27892
|
27893
|
27894
|
27895
|
27896
|
27897
|
27898
|
28046
|
28047
|
28048
|
28049
|
28050
|
28051
|
28052
|
28053
|
28054
|
28055
|
28056
|
28057
|
28058
|
28059
|
28060
|
28061
|
28062
|
28063
|
28064
|
28065
|
28066
|
28097
|
28245
|
28246
|
28247
|
28248
|
28249
|
28250
|
28251
|
28252
|
28253
|
28732
|
29981
|
29982
|
29983
|
29984
|
29985
|
29986
|
29987
|
29988
|
29989
|
29990
|
29991
|
29992
|
29993
|
29994
|
29995
|
29996
|
29997
|
29998
|
29999
|
30000
|
30001
|
30002
|
30003
|
30004
|
30005
|
30006
|
30012
|
30016
|
30945
|
31299
|
35223
|
35224
|
35225
|
35226
|
35227
|
35228
|
35229
|
35230
|
35231
| 35232 |
35233
|
35234
|
35235
|
35236
|
35237
|
35238
|
35239
|
35240
|
35241
|
35242
|
35243
|
35244
|
35245
|
35246
|
35247
|
35248
|
35249
|
35250
|
35251
|
35252
|
35253