From e8a27a67fadfa8e62d1c72979281bcd74c39c489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Javier=20L=C3=B3pez?= Date: Wed, 18 Apr 2018 17:50:56 +0000 Subject: Fix Custom hooks are not triggered by UI wiki edit --- app/models/project_wiki.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/models/project_wiki.rb') diff --git a/app/models/project_wiki.rb b/app/models/project_wiki.rb index 52e067cb44c..b7e38ceb502 100644 --- a/app/models/project_wiki.rb +++ b/app/models/project_wiki.rb @@ -179,7 +179,11 @@ class ProjectWiki def commit_details(action, message = nil, title = nil) commit_message = message || default_message(action, title) - Gitlab::Git::Wiki::CommitDetails.new(@user.name, @user.email, commit_message) + Gitlab::Git::Wiki::CommitDetails.new(@user.id, + @user.username, + @user.name, + @user.email, + commit_message) end def default_message(action, title) -- cgit v1.2.3 From ec4423665cacfe2f0675fb8b9b5bd8dd17a77dd7 Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Fri, 13 Apr 2018 12:57:19 +0200 Subject: Gitlab::Shell works on shard name, not path Direct disk access is done through Gitaly now, so the legacy path was deprecated. This path was used in Gitlab::Shell however. This required the refactoring in this commit. Added is the removal of direct path access on the project model, as that lookup wasn't needed anymore is most cases. Closes https://gitlab.com/gitlab-org/gitaly/issues/1111 --- app/models/project_wiki.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/project_wiki.rb') diff --git a/app/models/project_wiki.rb b/app/models/project_wiki.rb index b7e38ceb502..f799a0b4227 100644 --- a/app/models/project_wiki.rb +++ b/app/models/project_wiki.rb @@ -21,7 +21,7 @@ class ProjectWiki end delegate :empty?, to: :pages - delegate :repository_storage_path, :hashed_storage?, to: :project + delegate :repository_storage, :hashed_storage?, to: :project def path @project.path + '.wiki' -- cgit v1.2.3 From 7350eb1fa83662d4aaa7541acb387b3742ba9788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Javier=20L=C3=B3pez?= Date: Mon, 4 Jun 2018 11:41:37 +0000 Subject: Add ability to search wiki titles --- app/models/project_wiki.rb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'app/models/project_wiki.rb') diff --git a/app/models/project_wiki.rb b/app/models/project_wiki.rb index f799a0b4227..a6f94b3e3b0 100644 --- a/app/models/project_wiki.rb +++ b/app/models/project_wiki.rb @@ -140,10 +140,6 @@ class ProjectWiki [title, title_array.join("/")] end - def search_files(query) - repository.search_files_by_content(query, default_branch) - end - def repository @repository ||= Repository.new(full_path, @project, disk_path: disk_path, is_wiki: true) end -- cgit v1.2.3