summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2010-05-14 01:55:50 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2010-05-14 01:55:50 +0200
commit5fcfa9bb89f95849ffdb44df4f9e68a6032a7288 (patch)
treecdb71293e9d0172af41f3e2eec3563cd81f6a456
parent475abdfcbaa5609ccbc480afa2ab1670574387fd (diff)
downloadbugzilla-5fcfa9bb89f95849ffdb44df4f9e68a6032a7288.tar.gz
bugzilla-5fcfa9bb89f95849ffdb44df4f9e68a6032a7288.tar.xz
Backing out bug 271913: comments are no longer displayed, see also bug 565794
-rw-r--r--Bugzilla/Bug.pm8
-rw-r--r--template/en/default/bug/comments.html.tmpl2
2 files changed, 6 insertions, 4 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 9a915b6f8..92db18744 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -2245,7 +2245,11 @@ sub add_comment {
$comment = $self->_check_comment($comment);
$params ||= {};
- $params->{work_time} = $self->_check_work_time($params->{work_time});
+ if (exists $params->{work_time}) {
+ $params->{work_time} = $self->_check_work_time($params->{work_time});
+ ThrowUserError('comment_required')
+ if $comment eq '' && $params->{work_time} != 0;
+ }
if (exists $params->{type}) {
$params->{type} = $self->_check_comment_type($params->{type});
}
@@ -2255,7 +2259,7 @@ sub add_comment {
}
# XXX We really should check extra_data, too.
- if ($comment eq '' && !($params->{type} || abs($params->{work_time}))) {
+ if ($comment eq '' && !($params->{type} || $params->{work_time})) {
return;
}
diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl
index 27f7b3593..93b954e87 100644
--- a/template/en/default/bug/comments.html.tmpl
+++ b/template/en/default/bug/comments.html.tmpl
@@ -94,7 +94,6 @@
[% DEFAULT start_at = 0 mode = "show" %]
-[% timetracking_only = (comment_body == '' && comment.work_time != 0) %]
[% sort_order = user.settings.comment_sort_order.value %]
[%# NOTE: (start_at > 0) means we came here from a midair collision,
@@ -158,7 +157,6 @@
[% BLOCK a_comment %]
[% RETURN IF comment.is_private AND ! user.is_insider %]
- [% RETURN IF timetracking_only AND !user.is_timetracker %]
<div id="c[% count %]" class="bz_comment[% " bz_private" IF comment.is_private %]
[% " bz_comment_hilite" IF marks.$count %]