Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-19 15:09:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-19 15:09:33 +0300
commit652bd073731b0028641672a75355c7918b5ac116 (patch)
treee0239f98153492ac89c6fc374c5dfd1aa270d8bf /app/models/project_wiki.rb
parent2af90cef2e2e9c776eae4394a43dba3be7f33d1e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/project_wiki.rb')
-rw-r--r--app/models/project_wiki.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/models/project_wiki.rb b/app/models/project_wiki.rb
index f8528a41634..50ce1c67453 100644
--- a/app/models/project_wiki.rb
+++ b/app/models/project_wiki.rb
@@ -19,10 +19,11 @@ class ProjectWiki
DIRECTION_DESC = 'desc'
DIRECTION_ASC = 'asc'
+ attr_reader :project, :user
+
# Returns a string describing what went wrong after
# an operation fails.
attr_reader :error_message
- attr_reader :project
def initialize(project, user = nil)
@project = project
@@ -196,9 +197,9 @@ class ProjectWiki
def commit_details(action, message = nil, title = nil)
commit_message = message.presence || default_message(action, title)
- git_user = Gitlab::Git::User.from_gitlab(@user)
+ git_user = Gitlab::Git::User.from_gitlab(user)
- Gitlab::Git::Wiki::CommitDetails.new(@user.id,
+ Gitlab::Git::Wiki::CommitDetails.new(user.id,
git_user.username,
git_user.name,
git_user.email,
@@ -206,7 +207,7 @@ class ProjectWiki
end
def default_message(action, title)
- "#{@user.username} #{action} page: #{title}"
+ "#{user.username} #{action} page: #{title}"
end
def update_project_activity