Commit bd068592 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 493242: UTF-8 characters in custom field names are mangled in…

Bug 493242: UTF-8 characters in custom field names are mangled in show_activity.cgi - Patch by Vitaly Fedrushkov <vitaly.fedrushkov@gmail.com> r/a=LpSolit
parent 155bc6f8
......@@ -3133,14 +3133,7 @@ sub GetBugActivity {
$suppwhere = "AND COALESCE(attachments.isprivate, 0) = 0";
}
my $query = "
SELECT COALESCE(fielddefs.description, "
# This is a hack - PostgreSQL requires both COALESCE
# arguments to be of the same type, and this is the only
# way supported by both MySQL 3 and PostgreSQL to convert
# an integer to a string. MySQL 4 supports CAST.
. $dbh->sql_string_concat('bugs_activity.fieldid', q{''}) .
"), fielddefs.name, bugs_activity.attach_id, " .
my $query = "SELECT fielddefs.name, bugs_activity.attach_id, " .
$dbh->sql_date_format('bugs_activity.bug_when', '%Y.%m.%d %H:%i:%s') .
", bugs_activity.removed, bugs_activity.added, profiles.login_name
FROM bugs_activity
......@@ -3163,7 +3156,7 @@ sub GetBugActivity {
my $incomplete_data = 0;
foreach my $entry (@$list) {
my ($field, $fieldname, $attachid, $when, $removed, $added, $who) = @$entry;
my ($fieldname, $attachid, $when, $removed, $added, $who) = @$entry;
my %change;
my $activity_visible = 1;
......@@ -3180,9 +3173,6 @@ sub GetBugActivity {
}
if ($activity_visible) {
# This gets replaced with a hyperlink in the template.
$field =~ s/^Attachment\s*// if $attachid;
# Check for the results of an old Bugzilla data corruption bug
$incomplete_data = 1 if ($added =~ /^\?/ || $removed =~ /^\?/);
......@@ -3205,7 +3195,6 @@ sub GetBugActivity {
$operation->{'who'} = $who;
$operation->{'when'} = $when;
$change{'field'} = $field;
$change{'fieldname'} = $fieldname;
$change{'attachid'} = $attachid;
$change{'removed'} = $removed;
......
......@@ -220,9 +220,6 @@ sub history {
$change->{added} = $self->type('string', $change->{added});
$change->{field_name} = $self->type('string',
delete $change->{fieldname});
# This is going to go away in the future from GetBugActivity
# so we shouldn't put it in the API.
delete $change->{field};
push (@{$bug_history{changes}}, $change);
}
......
......@@ -33,7 +33,6 @@
# it was affected by an old Bugzilla bug.)
#%]
[% PROCESS global/variables.none.tmpl %]
[% PROCESS "global/field-descs.none.tmpl" %]
[% PROCESS bug/time.html.tmpl %]
......@@ -73,7 +72,7 @@
<a href="attachment.cgi?id=[% change.attachid %]">
Attachment #[% change.attachid %]</a>
[% END %]
[%+ change.field %]
[%+ field_descs.${change.fieldname} FILTER html %]
</td>
<td>
[% IF change.removed.defined %]
......
......@@ -364,7 +364,6 @@
'bug/activity/table.html.tmpl' => [
'change.attachid',
'change.field',
],
'attachment/create.html.tmpl' => [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment