Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
80285a18
Commit
80285a18
authored
Nov 05, 2014
by
Koosha KM
Committed by
David Lawrence
Nov 05, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1089820: Make use of User.use_markdown() defined in Bug 1059684
r=dkl,a=glob
parent
9925e7c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
Bug.pm
Bugzilla/WebService/Bug.pm
+6
-11
No files found.
Bugzilla/WebService/Bug.pm
View file @
80285a18
...
@@ -832,7 +832,8 @@ sub add_attachment {
...
@@ -832,7 +832,8 @@ sub add_attachment {
$comment
=
$params
->
{
comment
}
->
{
body
};
$comment
=
$params
->
{
comment
}
->
{
body
};
}
}
ThrowUserError
(
'markdown_disabled'
)
if
$is_markdown
&&
!
_is_markdown_enabled
();
ThrowUserError
(
'markdown_disabled'
)
if
$is_markdown
&&
!
Bugzilla
->
user
->
use_markdown
();
$attachment
->
bug
->
add_comment
(
$comment
,
$attachment
->
bug
->
add_comment
(
$comment
,
{
is_markdown
=>
$is_markdown
,
{
is_markdown
=>
$is_markdown
,
...
@@ -891,7 +892,8 @@ sub update_attachment {
...
@@ -891,7 +892,8 @@ sub update_attachment {
$comment
=
$comment
->
{
body
};
$comment
=
$comment
->
{
body
};
}
}
ThrowUserError
(
'markdown_disabled'
)
if
$is_markdown
&&
!
_is_markdown_enabled
();
ThrowUserError
(
'markdown_disabled'
)
if
$is_markdown
&&
!
$user
->
use_markdown
();
# Update the values
# Update the values
foreach
my
$attachment
(
@attachments
)
{
foreach
my
$attachment
(
@attachments
)
{
...
@@ -972,7 +974,8 @@ sub add_comment {
...
@@ -972,7 +974,8 @@ sub add_comment {
$params
->
{
is_private
}
=
delete
$params
->
{
private
};
$params
->
{
is_private
}
=
delete
$params
->
{
private
};
}
}
ThrowUserError
(
'markdown_disabled'
)
if
$params
->
{
is_markdown
}
&&
!
_is_markdown_enabled
();
ThrowUserError
(
'markdown_disabled'
)
if
$params
->
{
is_markdown
}
&&
!
$user
->
use_markdown
();
# Append comment
# Append comment
$bug
->
add_comment
(
$comment
,
{
isprivate
=>
$params
->
{
is_private
},
$bug
->
add_comment
(
$comment
,
{
isprivate
=>
$params
->
{
is_private
},
...
@@ -1425,14 +1428,6 @@ sub _add_update_tokens {
...
@@ -1425,14 +1428,6 @@ sub _add_update_tokens {
}
}
}
}
sub
_is_markdown_enabled
{
my
$user
=
Bugzilla
->
user
;
return
Bugzilla
->
feature
(
'markdown'
)
&&
$user
->
settings
->
{
use_markdown
}
->
{
is_enabled
}
&&
$user
->
setting
(
'use_markdown'
)
eq
'on'
;
}
1
;
1
;
__END__
__END__
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment