diff options
author | Hiroyuki Sato <sathiroyuki@gmail.com> | 2017-07-23 21:26:02 +0900 |
---|---|---|
committer | Hiroyuki Sato <sathiroyuki@gmail.com> | 2017-07-23 21:26:02 +0900 |
commit | 9b25bbc45d4e6602452e230506601ff0ed8ba84a (patch) | |
tree | 95f7326e4162a325a5e7c7304c33f18194b52cbe /app/services/wiki_pages | |
parent | 839018d2d4e3e899b1fa06a43d093a0fdceced42 (diff) | |
parent | b92d5135d8522e1370636799d74b51f9a37d0b2f (diff) | |
download | gitlab-ce-9b25bbc45d4e6602452e230506601ff0ed8ba84a.tar.gz |
Merge branch 'master' into 1827-prevent-concurrent-editing-wiki
Conflicts:
app/controllers/projects/wikis_controller.rb
app/views/projects/wikis/edit.html.haml
spec/features/projects/wiki/user_updates_wiki_page_spec.rb
Diffstat (limited to 'app/services/wiki_pages')
-rw-r--r-- | app/services/wiki_pages/base_service.rb | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/app/services/wiki_pages/base_service.rb b/app/services/wiki_pages/base_service.rb index 14317ea65c8..260c04a8b94 100644 --- a/app/services/wiki_pages/base_service.rb +++ b/app/services/wiki_pages/base_service.rb @@ -1,23 +1,9 @@ module WikiPages class BaseService < ::BaseService - def hook_data(page, action) - hook_data = { - object_kind: page.class.name.underscore, - user: current_user.hook_attrs, - project: @project.hook_attrs, - wiki: @project.wiki.hook_attrs, - object_attributes: page.hook_attrs - } - - page_url = Gitlab::UrlBuilder.build(page) - hook_data[:object_attributes].merge!(url: page_url, action: action) - hook_data - end - private def execute_hooks(page, action = 'create') - page_data = hook_data(page, action) + page_data = Gitlab::DataBuilder::WikiPage.build(page, current_user, action) @project.execute_hooks(page_data, :wiki_page_hooks) @project.execute_services(page_data, :wiki_page_hooks) end |