From 5da9fee9963bd0e9b7323337952f304bcfa26128 Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Mon, 6 Aug 2018 12:21:06 -0400 Subject: Bug 1481207 - POST /rest/bug_user_last_visit returns random number instead of bug ID --- Bugzilla/WebService/BugUserLastVisit.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Bugzilla/WebService') diff --git a/Bugzilla/WebService/BugUserLastVisit.pm b/Bugzilla/WebService/BugUserLastVisit.pm index 7b729c6c8..5e4c0d2ba 100644 --- a/Bugzilla/WebService/BugUserLastVisit.pm +++ b/Bugzilla/WebService/BugUserLastVisit.pm @@ -52,7 +52,7 @@ sub update { push( @results, $self->_bug_user_last_visit_to_hash( - $bug, $last_visit_ts, $params + $bug_id, $last_visit_ts, $params )); } $dbh->bz_commit_transaction(); -- cgit v1.2.3-24-g4f1b From fd850e00db835d2b84c59014c3b1021fea2294fc Mon Sep 17 00:00:00 2001 From: Israel Madueme Date: Fri, 10 Aug 2018 08:57:01 -0400 Subject: Bug 1456878 - Support markdown comments --- Bugzilla/WebService/Bug.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Bugzilla/WebService') diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index feb541c2e..d14300f6f 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -362,7 +362,7 @@ sub render_comment { Bugzilla->switch_to_shadow_db(); my $bug = $params->{id} ? Bugzilla::Bug->check($params->{id}) : undef; - my $html = Bugzilla::Template::quoteUrls($params->{text}, $bug); + my $html = Bugzilla::Template::renderComment($params->{text}, $bug); return { html => $html }; } @@ -381,6 +381,7 @@ sub _translate_comment { time => $self->type('dateTime', $comment->creation_ts), creation_time => $self->type('dateTime', $comment->creation_ts), is_private => $self->type('boolean', $comment->is_private), + is_markdown => $self->type('boolean', $comment->is_markdown), text => $self->type('string', $comment->body_full), attachment_id => $self->type('int', $attach_id), count => $self->type('int', $comment->count), @@ -1112,9 +1113,11 @@ sub add_comment { if (defined $params->{private}) { $params->{is_private} = delete $params->{private}; } + # Append comment $bug->add_comment($comment, { isprivate => $params->{is_private}, - work_time => $params->{work_time} }); + work_time => $params->{work_time}, + is_markdown => 1 }); # Add comment tags $bug->set_all({ comment_tags => $params->{comment_tags} }) -- cgit v1.2.3-24-g4f1b From ec87e5310ad038abe4b2b329897638d866bf549a Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Tue, 14 Aug 2018 08:28:31 -0400 Subject: Revert "Bug 1456878 - Support markdown comments" This reverts commit fd850e00db835d2b84c59014c3b1021fea2294fc. --- Bugzilla/WebService/Bug.pm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'Bugzilla/WebService') diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index d14300f6f..feb541c2e 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -362,7 +362,7 @@ sub render_comment { Bugzilla->switch_to_shadow_db(); my $bug = $params->{id} ? Bugzilla::Bug->check($params->{id}) : undef; - my $html = Bugzilla::Template::renderComment($params->{text}, $bug); + my $html = Bugzilla::Template::quoteUrls($params->{text}, $bug); return { html => $html }; } @@ -381,7 +381,6 @@ sub _translate_comment { time => $self->type('dateTime', $comment->creation_ts), creation_time => $self->type('dateTime', $comment->creation_ts), is_private => $self->type('boolean', $comment->is_private), - is_markdown => $self->type('boolean', $comment->is_markdown), text => $self->type('string', $comment->body_full), attachment_id => $self->type('int', $attach_id), count => $self->type('int', $comment->count), @@ -1113,11 +1112,9 @@ sub add_comment { if (defined $params->{private}) { $params->{is_private} = delete $params->{private}; } - # Append comment $bug->add_comment($comment, { isprivate => $params->{is_private}, - work_time => $params->{work_time}, - is_markdown => 1 }); + work_time => $params->{work_time} }); # Add comment tags $bug->set_all({ comment_tags => $params->{comment_tags} }) -- cgit v1.2.3-24-g4f1b From 4a66989c7cf4bcb1afce0c4e39a3f1c87ef0e57c Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Tue, 3 Apr 2018 23:05:04 -0400 Subject: Bug 1455495 - Replace apache with Mojolicious --- Bugzilla/WebService/Server/XMLRPC.pm | 6 +----- Bugzilla/WebService/Util.pm | 8 +++++--- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'Bugzilla/WebService') diff --git a/Bugzilla/WebService/Server/XMLRPC.pm b/Bugzilla/WebService/Server/XMLRPC.pm index 6bb73af01..5ad50e91c 100644 --- a/Bugzilla/WebService/Server/XMLRPC.pm +++ b/Bugzilla/WebService/Server/XMLRPC.pm @@ -14,11 +14,7 @@ use warnings; use Bugzilla::Logging; use XMLRPC::Transport::HTTP; use Bugzilla::WebService::Server; -if ($ENV{MOD_PERL}) { - our @ISA = qw(XMLRPC::Transport::HTTP::Apache Bugzilla::WebService::Server); -} else { - our @ISA = qw(XMLRPC::Transport::HTTP::CGI Bugzilla::WebService::Server); -} +our @ISA = qw(XMLRPC::Transport::HTTP::CGI Bugzilla::WebService::Server); use Bugzilla::WebService::Constants; use Bugzilla::Error; diff --git a/Bugzilla/WebService/Util.pm b/Bugzilla/WebService/Util.pm index 29ff05448..d462c884a 100644 --- a/Bugzilla/WebService/Util.pm +++ b/Bugzilla/WebService/Util.pm @@ -23,7 +23,7 @@ use base qw(Exporter); # We have to "require", not "use" this, because otherwise it tries to # use features of Test::More during import(). -require Test::Taint; +require Test::Taint if ${^TAINT}; our @EXPORT_OK = qw( extract_flags @@ -193,8 +193,10 @@ sub taint_data { # Though this is a private function, it hasn't changed since 2004 and # should be safe to use, and prevents us from having to write it ourselves # or require another module to do it. - Test::Taint::_deeply_traverse(\&_delete_bad_keys, \@params); - Test::Taint::taint_deeply(\@params); + if (${^TAINT}) { + Test::Taint::_deeply_traverse(\&_delete_bad_keys, \@params); + Test::Taint::taint_deeply(\@params); + } } sub _delete_bad_keys { -- cgit v1.2.3-24-g4f1b