Bugzilla – Attachment 12000 Details for
Bug 7986
Export issues
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7986: Followup: Replace DontExportFields and CsvProfileForExport
Bug-7986-Followup-Replace-DontExportFields-and-Csv.patch (text/plain), 9.68 KB, created by
Jonathan Druart
on 2012-09-06 08:43:06 UTC
(
hide
)
Description:
Bug 7986: Followup: Replace DontExportFields and CsvProfileForExport
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2012-09-06 08:43:06 UTC
Size:
9.68 KB
patch
obsolete
>From 350ad4e59aa918d23801503b6768669f114bc575 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 5 Sep 2012 11:02:29 +0200 >Subject: [PATCH] Bug 7986: Followup: Replace DontExportFields and > CsvProfileForExport > >Replace DontExportFields by ExportRemoveFields >and CsvProfileForExport by ExportWithCsvProfile >--- > circ/circulation.pl | 4 ++-- > installer/data/mysql/updatedatabase.pl | 8 ++++---- > .../prog/en/modules/admin/preferences/circulation.pref | 2 +- > .../prog/en/modules/admin/preferences/tools.pref | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 6 +++--- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt | 8 ++++---- > tools/export.pl | 10 +++++----- > 7 files changed, 20 insertions(+), 20 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 2a884a1..91adc09 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -732,8 +732,8 @@ $template->param( > AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"), > dateformat => C4::Context->preference("dateformat"), > DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), >- dont_export_fields => C4::Context->preference("DontExportFields"), >- csv_profile_for_export => C4::Context->preference("CsvProfileForExport"), >+ export_remove_fields => C4::Context->preference("ExportRemoveFields"), >+ export_with_csv_profile => C4::Context->preference("ExportWithCsvProfile"), > canned_bor_notes_loop => $canned_notes, > ); > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index f797e5a..89e3f5a 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -5687,18 +5687,18 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > $DBversion = "3.09.00.XXX"; > if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > $dbh->do(qq{ >- INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('DontExportFields','','List of fields for non export in circulation.pl (separated by a space)','',''); >+ INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('ExportRemoveFields','','List of fields for non export in circulation.pl (separated by a space)','',''); > }); >- print "Upgrade to $DBversion done (Add system preference DontExportFields)\n"; >+ print "Upgrade to $DBversion done (Add system preference ExportRemoveFields)\n"; > SetVersion($DBversion); > } > > $DBversion = "3.09.00.XXX"; > if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > $dbh->do(qq{ >- INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('CsvProfileForExport','','Set a profile name for CSV export','',''); >+ INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('ExportWithCsvProfile','','Set a profile name for CSV export','',''); > }); >- print "Upgrade to $DBversion done (Adds New System preference CsvProfileForExport)\n"; >+ print "Upgrade to $DBversion done (Adds New System preference ExportWithCsvProfile)\n"; > SetVersion($DBversion) > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index eb71489..5d0fe25 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -111,7 +111,7 @@ Circulation: > no: "Do not" > - update a bibliographic record's total issues count whenever an item is issued (WARNING! This increases server load significantly; if performance is a concern, use the update_totalissues.pl cron job to update the total issues count). > - >- - pref: DontExportFields >+ - pref: ExportRemoveFields > - choices: > yes: Export > no: "Don't export" >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/tools.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/tools.pref >index f5ea186..2891b0e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/tools.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/tools.pref >@@ -1,4 +1,4 @@ > Tools: > - >- - pref: CsvProfileForExport >+ - pref: ExportWithCsvProfile > - CSV profile for export >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 6096f2b..640dc2c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -201,8 +201,8 @@ function export_submit(format) { > } else if (format == 'iso2709') { > $("#dont_export_item").val(1); > } else { >- [% UNLESS ( csv_profile_for_export ) %] >- alert(_("You must defined a csv profile for export (in tools>CSV export profiles) and filled the CsvProfileForExport system preference")); >+ [% UNLESS ( export_with_csv_profile ) %] >+ alert(_("You must defined a csv profile for export (in tools>CSV export profiles) and filled the ExportWithCsvProfile system preference")); > return false; > [% END %] > } >@@ -920,7 +920,7 @@ No patron matched <span class="ex">[% message %]</span> > <input type="submit" name="renew_checked" value="Renew or Return checked items" /> > <input type="submit" id="renew_all" name="renew_all" value="Renew all" /> > <br/><br/> >- Don't export fields : <input type="text" id="dont_export_fields" name="dont_export_fields" value="[% dont_export_fields %]" title="Use for iso2709 exports" /> >+ Don't export fields : <input type="text" id="export_remove_fields" name="export_remove_fields" value="[% export_remove_fields %]" title="Use for iso2709 exports" /> > <span id="exportmenuc">Export</span> > <input type="hidden" name="op" value="export" /> > <input type="hidden" id="export_format" name="format" value="iso2709" /> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt >index 0eb0f9f..b5072da 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt >@@ -107,8 +107,8 @@ $(document).ready(function() { > <input id="strip_nonlocal_items" type="checkbox" name="strip_nonlocal_items" /> > </li> > <li> >- <label for="dont_export_fields">Don't export fields</label> >- <input id="dont_export_fields" type="text" name="dont_export_fields" value="[% dont_export_fields %]" /> >+ <label for="export_remove_fields">Don't export fields</label> >+ <input id="export_remove_fields" type="text" name="export_remove_fields" value="[% export_remove_fields %]" /> > separate by a blank. (e.g., 100a 200 606) > </li></ol> > </fieldset> >@@ -166,8 +166,8 @@ $(document).ready(function() { > <legend>Options</legend> > <ol> > <li> >- <label for="dont_export_fields">Don't export fields</label> >- <input id="dont_export_fields" type="text" name="dont_export_fields" /> >+ <label for="export_remove_fields">Don't export fields</label> >+ <input id="export_remove_fields" type="text" name="export_remove_fields" /> > separate by a blank. (e.g., 100a 200 606) > </li></ol> > </fieldset> >diff --git a/tools/export.pl b/tools/export.pl >index 390de95..a4eb6e9 100755 >--- a/tools/export.pl >+++ b/tools/export.pl >@@ -156,7 +156,7 @@ if ( $op eq "export" ) { > $record_type = $query->param("record_type") unless ($commandline); > $output_format = $query->param("output_format") || 'marc' > unless ($commandline); >- my $dont_export_fields = $query->param("dont_export_fields"); >+ my $export_remove_fields = $query->param("export_remove_fields"); > my @biblionumbers = $query->param("biblionumbers"); > my @itemnumbers = $query->param("itemnumbers"); > my @sql_params; >@@ -355,8 +355,8 @@ if ( $op eq "export" ) { > next if not defined $record; > } > >- if ($dont_export_fields) { >- my @fields = split " ", $dont_export_fields; >+ if ($export_remove_fields) { >+ my @fields = split " ", $export_remove_fields; > foreach (@fields) { > /^(\d*)(\w)?$/; > my $field = $1; >@@ -394,7 +394,7 @@ if ( $op eq "export" ) { > my @itemnumbers = $query->param("itemnumbers"); > my $output = > marc2csv( \@biblionumbers, >- GetCsvProfileId( C4::Context->preference('CsvProfileForExport') ), >+ GetCsvProfileId( C4::Context->preference('ExportWithCsvProfile') ), > \@itemnumbers, ); > print $query->header( > -type => 'application/octet-stream', >@@ -468,7 +468,7 @@ else { > itemtypeloop => \@itemtypesloop, > DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), > authtypeloop => \@authtypesloop, >- dont_export_fields => C4::Context->preference("DontExportFields"), >+ export_remove_fields => C4::Context->preference("ExportRemoveFields"), > ); > > output_html_with_http_headers $query, $cookie, $template->output; >-- >1.7.10.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 7986
:
9269
|
9972
|
10635
|
10675
|
11002
|
11388
|
11407
|
11408
|
11409
|
11972
|
11998
|
11999
|
12000
|
12168
|
12212
|
12296
|
12457
|
12819
|
12821
|
12822
|
12824
|
12840
|
12841
|
12850
|
12882