]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 493242: UTF-8 characters in custom field names are mangled in show_activity.cgi...
authorlpsolit%gmail.com <>
Mon, 26 Oct 2009 11:28:48 +0000 (11:28 +0000)
committerlpsolit%gmail.com <>
Mon, 26 Oct 2009 11:28:48 +0000 (11:28 +0000)
Bugzilla/Bug.pm
Bugzilla/WebService/Bug.pm
template/en/default/bug/activity/table.html.tmpl
template/en/default/filterexceptions.pl

index 528c6544c7e83136fe249e91457d14270e883ae5..456f77c9f25a78b8780baf1084347a9e21e7b409 100644 (file)
@@ -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;
index 44382e79f81ad1c392af81133d070ee7285df369..6a3e93519420aa28d059f7ff853b5bee4c2d3420 100644 (file)
@@ -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);
             }
             
index 55f7f6e456092ef7a452e0f7f3acfd66d5a4ff07..a467fe5f2cd9f71c93fae9d3fba055afe5144a3e 100644 (file)
@@ -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 %]
index 9e04b8ef05fb053e87b55d0ef470b2ae33e60408..1985216496fa7334a7b45e4f89d479eca5c8c295 100644 (file)
 
 'bug/activity/table.html.tmpl' => [
   'change.attachid', 
-  'change.field', 
 ],
 
 'attachment/create.html.tmpl' => [