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
18ce4ffb
Commit
18ce4ffb
authored
Jan 20, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ES: update wiki index on wiki update
parent
e360b930
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
app/models/project_wiki.rb
app/models/project_wiki.rb
+10
-0
No files found.
app/models/project_wiki.rb
View file @
18ce4ffb
...
...
@@ -94,6 +94,8 @@ class ProjectWiki
wiki
.
write_page
(
title
,
format
,
content
,
commit
)
update_elastic_index
update_project_activity
rescue
Gollum
::
DuplicatePageError
=>
e
@error_message
=
"Duplicate page:
#{
e
.
message
}
"
...
...
@@ -105,12 +107,16 @@ class ProjectWiki
wiki
.
update_page
(
page
,
page
.
name
,
format
,
content
,
commit
)
update_elastic_index
update_project_activity
end
def
delete_page
(
page
,
message
=
nil
)
wiki
.
delete_page
(
page
,
commit_details
(
:deleted
,
message
,
page
.
title
))
update_elastic_index
update_project_activity
end
...
...
@@ -163,4 +169,8 @@ class ProjectWiki
def
update_project_activity
@project
.
touch
(
:last_activity_at
)
end
def
update_elastic_index
index_blobs
if
Gitlab
.
config
.
elasticsearch
.
enabled
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