Bugzilla – Attachment 21302 Details for
Bug 10853
Create CSV profiles with sql fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10853 - followup to correct tabs
Bug-10853---followup-to-correct-tabs.patch (text/plain), 7.26 KB, created by
Bernardo Gonzalez Kriegel
on 2013-09-21 21:28:26 UTC
(
hide
)
Description:
Bug 10853 - followup to correct tabs
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2013-09-21 21:28:26 UTC
Size:
7.26 KB
patch
obsolete
>From ba0cd23a0eb7e5db9ca6f41a731301846be9c140 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Sat, 21 Sep 2013 18:26:32 -0300 >Subject: [PATCH] Bug 10853 - followup to correct tabs > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >--- > .../prog/en/modules/tools/csv-profiles.tt | 14 +++++++------- > tools/csv-profiles.pl | 12 ++++++------ > 2 files changed, 13 insertions(+), 13 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt >index 9c58751..e2a299c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt >@@ -118,7 +118,7 @@ function reloadPage(p) { > </select> > </li> > >- <li class="marc_specific"><label for="new_subfield_separator">Subfield separator: </label> >+ <li class="marc_specific"><label for="new_subfield_separator">Subfield separator: </label> > <select name="subfield_separator" id="new_subfield_separator"> > <option value=":">Colon (:)</option> > <option value=",">Comma (,)</option> >@@ -131,7 +131,7 @@ function reloadPage(p) { > </select> > </li> > >- <li class="marc_specific"><label for="new_encoding">Encoding: </label> >+ <li class="marc_specific"><label for="new_encoding">Encoding: </label> > <select name="encoding" id="new_encoding"> > [% FOREACH encoding IN encodings %] > [% IF ( encoding.encoding == 'utf8' ) %] >@@ -144,7 +144,7 @@ function reloadPage(p) { > > > <li class="marc_specific"><label for="new_profile_marc_content">Profile MARC fields: </label> >- <textarea cols="50" rows="2" name="profile_marc_content" id="new_profile_marc_content"></textarea> >+ <textarea cols="50" rows="2" name="profile_marc_content" id="new_profile_marc_content"></textarea> > <p>You have to define which fields or subfields you want to export, separated by pipes.</p> > <p>You can also use your own headers (instead of the ones from Koha) by prefixing the field number with an header, followed by the equal sign.</p> > <p>Example: Personal name=200|Entry element=210$a|300|009</p> >@@ -238,7 +238,7 @@ function reloadPage(p) { > [% END %] > </select></li> > >- <li class="marc_specific"><label for="field_separator">Field separator: </label> >+ <li class="marc_specific"><label for="field_separator">Field separator: </label> > <select name="field_separator" id="field_separator"> > <option value=":">Colon (:)</option> > >@@ -285,7 +285,7 @@ function reloadPage(p) { > </select></li> > > >- <li class="marc_specific"><label for="subfield_separator">Subfield separator: </label> >+ <li class="marc_specific"><label for="subfield_separator">Subfield separator: </label> > <select name="subfield_separator" id="subfield_separator"> > <option value=":">Colon (:)</option> > >@@ -332,7 +332,7 @@ function reloadPage(p) { > > </select></li> > >- <li class="marc_specific"><label for="encoding">Encoding: </label> >+ <li class="marc_specific"><label for="encoding">Encoding: </label> > <select name="encoding" id="encoding"> > [% FOREACH encoding IN encodings %] > [% IF ( selected_encoding == encoding.encoding ) %] >@@ -344,7 +344,7 @@ function reloadPage(p) { > </select></li> > > <li class="marc_specific"><label for="modify_profile_marc_content">Profile MARC fields: </label> >- <textarea cols="50" rows="2" name="profile_marc_content" id="modify_profile_marc_content">[% selected_profile_content %]</textarea></li> >+ <textarea cols="50" rows="2" name="profile_marc_content" id="modify_profile_marc_content">[% selected_profile_content %]</textarea></li> > > <li class="sql_specific"> > <label for="modify_profile_sql_content">Profile SQL fields: </label> >diff --git a/tools/csv-profiles.pl b/tools/csv-profiles.pl >index d144ed7..45b1285 100755 >--- a/tools/csv-profiles.pl >+++ b/tools/csv-profiles.pl >@@ -85,16 +85,16 @@ if ($profile_name && $profile_content && $action) { > my $rows; > > if ($action eq "create") { >- my $query = "INSERT INTO export_format(export_format_id, profile, description, content, csv_separator, field_separator, subfield_separator, encoding, type) VALUES (NULL, ?, ?, ?, ?, ?, ?, ?, ?)"; >+ my $query = "INSERT INTO export_format(export_format_id, profile, description, content, csv_separator, field_separator, subfield_separator, encoding, type) VALUES (NULL, ?, ?, ?, ?, ?, ?, ?, ?)"; > my $sth = $dbh->prepare($query); >- $rows = $sth->execute($profile_name, $profile_description, $profile_content, $csv_separator, $field_separator, $subfield_separator, $encoding, $type); >+ $rows = $sth->execute($profile_name, $profile_description, $profile_content, $csv_separator, $field_separator, $subfield_separator, $encoding, $type); > > } > > if ($action eq "edit") { >- my $query = "UPDATE export_format SET description=?, content=?, csv_separator=?, field_separator=?, subfield_separator=?, encoding=?, type=? WHERE export_format_id=? LIMIT 1"; >+ my $query = "UPDATE export_format SET description=?, content=?, csv_separator=?, field_separator=?, subfield_separator=?, encoding=?, type=? WHERE export_format_id=? LIMIT 1"; > my $sth = $dbh->prepare($query); >- $rows = $sth->execute($profile_description, $profile_content, $csv_separator, $field_separator, $subfield_separator, $encoding, $type, $profile_name); >+ $rows = $sth->execute($profile_description, $profile_content, $csv_separator, $field_separator, $subfield_separator, $encoding, $type, $profile_name); > } > > if ($action eq "delete") { >@@ -112,7 +112,7 @@ if ($profile_name && $profile_content && $action) { > > # If a profile has been selected for modification > if ($id) { >- my $query = "SELECT export_format_id, profile, description, content, csv_separator, field_separator, subfield_separator, encoding, type FROM export_format WHERE export_format_id = ?"; >+ my $query = "SELECT export_format_id, profile, description, content, csv_separator, field_separator, subfield_separator, encoding, type FROM export_format WHERE export_format_id = ?"; > my $sth; > $sth = $dbh->prepare($query); > >@@ -122,7 +122,7 @@ if ($profile_name && $profile_content && $action) { > selected_profile_id => $selected_profile->[0], > selected_profile_name => $selected_profile->[1], > selected_profile_description => $selected_profile->[2], >- selected_profile_content => $selected_profile->[3], >+ selected_profile_content => $selected_profile->[3], > selected_csv_separator => $selected_profile->[4], > selected_field_separator => $selected_profile->[5], > selected_subfield_separator => $selected_profile->[6], >-- >1.7.9.5
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 10853
:
20956
|
21183
|
21301
|
21302
|
21373
|
21380
|
21381
|
21382