Bugzilla – Attachment 39524 Details for
Bug 14143
Patron cards: Crash (confusion between table names creator_templates and club_template_enrollment_fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14143 - Patron cards: Crash (confusion between table names creator_templates and club_template_enrollment_fields)
Bug-14143---Patron-cards-Crash-confusion-between-t.patch (text/plain), 1.62 KB, created by
Marc Véron
on 2015-05-26 13:52:07 UTC
(
hide
)
Description:
Bug 14143 - Patron cards: Crash (confusion between table names creator_templates and club_template_enrollment_fields)
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-05-26 13:52:07 UTC
Size:
1.62 KB
patch
obsolete
>From 78a24e974c873c5f932f62093636b75ae7ad5da8 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Mon, 4 May 2015 23:29:29 +0200 >Subject: [PATCH] Bug 14143 - Patron cards: Crash (confusion between table > names creator_templates and > club_template_enrollment_fields) > >To reproduce: >Go to Home > Tools > Patron card creator >Click on 'Manage profiles' >Result: >Can't use string ("1") as an ARRAY ref while "strict refs" in use at /usr/share/kohaclone/C4/Creators/Lib.pm line 564. > >Reason: >Select statment to get field 'template code' from table 'club_template_enrollment_fields' (!) instead of 'table creator_templates'. > >To test: >Apply patch >Try to reproduce issue. > >Amended because of typo (_ instead of -) >--- > C4/Creators/Lib.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Creators/Lib.pm b/C4/Creators/Lib.pm >index 3f4c617..65a4c4a 100644 >--- a/C4/Creators/Lib.pm >+++ b/C4/Creators/Lib.pm >@@ -542,7 +542,7 @@ sub html_table { > next POPULATE_ROW; > } > elsif ($table_column =~ m/^_((.*)_(.*$))/) { # this a special case >- my $table_name = get_table_names($2); >+ my $table_name = get_table_names('creator_'.$2); #Bug 14143 fix to remove ambiguity with table 'club_template_enrollment_fields' > my $record_set = _SELECT($1, @$table_name[0], $2 . "_id = " . $db_row->{$2 . "_id"}); > $$fields[$col_index] = {hidden => 0, link_field => $link_field->{$table_column}, select_field => 0, field_name => ($table_column . "_tbl"), field_value => $$record_set[0]{$1}}; > $col_index++; >-- >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 14143
:
38830
|
39524
|
62819