enhanced password checking behavior in remove_orphaned_pages;
extracted password error to application
This commit is contained in:
parent
8b21b8286f
commit
bc97b8d4f7
3 changed files with 14 additions and 8 deletions
|
@ -71,6 +71,14 @@ class ApplicationController < ActionController::Base
|
|||
not @web_name.nil?
|
||||
end
|
||||
|
||||
def password_error(password)
|
||||
if password.nil? or password.empty?
|
||||
'Please enter the password.'
|
||||
else
|
||||
'You entered a wrong password. Please enter the right one.'
|
||||
end
|
||||
end
|
||||
|
||||
def redirect_show(page_name = @page_name, web = @web_name)
|
||||
redirect_to :web => web, :controller => 'wiki', :action => 'show',
|
||||
:id => CGI.escape(page_name || 'HomePage')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue