Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7b3fd816
Commit
7b3fd816
authored
Aug 22, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable comments on older merge request diff
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
d7a9dcc1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+5
-0
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
7b3fd816
...
@@ -93,6 +93,11 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -93,6 +93,11 @@ class Projects::MergeRequestsController < Projects::ApplicationController
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
{
define_discussion_vars
}
format
.
html
{
define_discussion_vars
}
format
.
json
do
format
.
json
do
if
@merge_request_diff
!=
@merge_request
.
merge_request_diff
# Disable comments if browsing older version of the diff
@diff_notes_disabled
=
true
end
@diffs
=
@merge_request_diff
.
diffs
(
diff_options
)
@diffs
=
@merge_request_diff
.
diffs
(
diff_options
)
render
json:
{
html:
view_to_html_string
(
"projects/merge_requests/show/_diffs"
)
}
render
json:
{
html:
view_to_html_string
(
"projects/merge_requests/show/_diffs"
)
}
...
...
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