Moved remove_orphaned_pages action to admin controller
This commit is contained in:
parent
bb2d16c8a1
commit
112a21da5c
6 changed files with 43 additions and 40 deletions
|
@ -76,4 +76,15 @@ class AdminController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def remove_orphaned_pages
|
||||
if wiki.authenticate(@params['system_password_orphaned'])
|
||||
wiki.remove_orphaned_pages(@web_name)
|
||||
flash[:info] = 'Orphaned pages removed'
|
||||
redirect_to :action => 'list'
|
||||
else
|
||||
flash[:error] = password_error(@params['system_password'])
|
||||
return_to_last_remembered
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -88,17 +88,6 @@ class WikiController < ApplicationController
|
|||
@pages_by_revision = @pages_in_category.by_revision
|
||||
end
|
||||
|
||||
def remove_orphaned_pages
|
||||
if wiki.authenticate(@params['system_password_orphaned'])
|
||||
wiki.remove_orphaned_pages(@web_name)
|
||||
flash[:info] = 'Orphaned pages removed'
|
||||
redirect_to :action => 'list'
|
||||
else
|
||||
flash[:error] = password_error(@params['system_password'])
|
||||
return_to_last_remembered
|
||||
end
|
||||
end
|
||||
|
||||
def rss_with_content
|
||||
render_rss
|
||||
end
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<% @title = "Edit Web" %>
|
||||
|
||||
<p><%= @wiki.system[:password] %></p>
|
||||
|
||||
<form action="edit_web" id="setup" method="post"
|
||||
onSubmit="cleanAddress(); return validateEditWebForm()">
|
||||
<h2 style="margin-bottom: 3px">Name and address</h2>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue