diff options
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Bug.pm | 8 | ||||
-rw-r--r-- | Bugzilla/Util.pm | 6 |
2 files changed, 6 insertions, 8 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 08c347abe..a41da186b 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -3845,7 +3845,7 @@ sub GetBugActivity { $datepart $attachpart $suppwhere - ORDER BY bugs_activity.bug_when"; + ORDER BY bugs_activity.bug_when, bugs_activity.id"; my $list = $dbh->selectall_arrayref($query, undef, @args); @@ -3941,13 +3941,11 @@ sub _join_activity_entries { # We need to insert characters as these were removed by old # LogActivityEntry code. - if ($current_change eq '') { - return $new_change; - } + return $new_change if $current_change eq ''; # Buglists and see_also need the comma restored if ($field eq 'dependson' || $field eq 'blocked' || $field eq 'see_also') { - if (substr($new_change, 0, 1) eq ',') { + if (substr($new_change, 0, 1) eq ',' || substr($new_change, 0, 1) eq ' ') { return $current_change . $new_change; } else { return $current_change . ', ' . $new_change; diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index e8d1438f3..e12882215 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -477,11 +477,11 @@ sub find_wrap_point { if (!$string) { return 0 } if (length($string) < $maxpos) { return length($string) } my $wrappoint = rindex($string, ",", $maxpos); # look for comma - if ($wrappoint < 0) { # can't find comma + if ($wrappoint <= 0) { # can't find comma $wrappoint = rindex($string, " ", $maxpos); # look for space - if ($wrappoint < 0) { # can't find space + if ($wrappoint <= 0) { # can't find space $wrappoint = rindex($string, "-", $maxpos); # look for hyphen - if ($wrappoint < 0) { # can't find hyphen + if ($wrappoint <= 0) { # can't find hyphen $wrappoint = $maxpos; # just truncate it } else { $wrappoint++; # leave hyphen on the left side |