enhanced password checking behavior in remove_orphaned_pages;

extracted password error to application
This commit is contained in:
Alexey Verkhovsky 2005-02-05 13:34:12 +00:00
parent 8b21b8286f
commit bc97b8d4f7
3 changed files with 14 additions and 8 deletions

View file

@ -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')