mailr/app/controllers/internal_controller.rb

39 lines
845 B
Ruby
Raw Normal View History

2011-07-24 22:22:13 +02:00
class InternalController < ApplicationController
theme :theme_resolver
layout "simple"
def error
2011-08-02 23:12:17 +02:00
2011-07-27 20:34:30 +02:00
end
def imaperror
@title = t(:imap_error)
@error = params[:error] || t(:unspecified_error)
logger.error "!!! InternalControllerImapError: " + @error
2011-07-29 20:05:47 +02:00
render 'error'
end
2011-08-02 23:12:17 +02:00
def page_not_found
@title = t(:page_not_found)
@error = t(:page_not_found)
logger.error "!!! InternalControllerError: " + @error
render 'error'
end
2011-07-29 20:05:47 +02:00
def loginfailure
reset_session
2011-08-16 20:05:58 +02:00
flash[:error] = t(:login_failure,:scope=>:user)
2011-07-29 20:05:47 +02:00
@current_user = nil
redirect_to :controller=>'user', :action => 'login'
2011-07-24 22:22:13 +02:00
end
2011-08-24 19:20:13 +02:00
def onlycanlogins
reset_session
flash[:error] = t(:only_can_logins,:scope=>:user)
@current_user = nil
redirect_to :controller=>'user', :action => 'login'
end
2011-07-24 22:22:13 +02:00
end