webmail_controller moded from components to app

This commit is contained in:
Eugene Korbut 2009-01-08 06:06:34 +10:00
parent 789f813b42
commit ab8bf72949
22 changed files with 6 additions and 5 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
log log
config/database.yml config/database.yml
.*.sw? .*.sw?
config/site.rb

View file

@ -19,7 +19,7 @@ class LoginController < ApplicationController
session["wmp"] = params['login_user']["password"] session["wmp"] = params['login_user']["password"]
end end
if session["return_to"] if session["return_to"]
redirect_to_path(session["return_to"]) redirect_to(session["return_to"])
session["return_to"] = nil session["return_to"] = nil
else else
redirect_to :action=>"index" redirect_to :action=>"index"

View file

@ -4,7 +4,7 @@ require 'net/imap'
require 'mail2screen' require 'mail2screen'
require 'ezcrypto' require 'ezcrypto'
class Webmail::WebmailController < ApplicationController class WebmailController < ApplicationController
# uses_component_template_root # uses_component_template_root
# Administrative functions # Administrative functions
@ -365,7 +365,7 @@ class Webmail::WebmailController < ApplicationController
load_folders load_folders
rescue Exception => ex rescue Exception => ex
logger.error("Exception on loggin webmail session - #{ex} - #{ex.backtrace.join("\t\n")}") logger.error("Exception on loggin webmail session - #{ex} - #{ex.backtrace.join("\t\n")}")
render_action "error_connection" render :action => "error_connection"
end end
end end

View file

@ -1,7 +1,7 @@
require 'cdfutils' require 'cdfutils'
require 'mail2screen' require 'mail2screen'
module Webmail::WebmailHelper module WebmailHelper
include Mail2Screen include Mail2Screen
def link_folders def link_folders
link_to(_('Folders'), :controller=>"/webmail/webmail", :action=>"messages") link_to(_('Folders'), :controller=>"/webmail/webmail", :action=>"messages")

View file

@ -5,7 +5,7 @@ ActionController::Routing::Routes.draw do |map|
# Here's a sample route: # Here's a sample route:
# map.connect 'products/:id', :controller => 'catalog', :action => 'view' # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
# Keep in mind you can assign values other than :controller and :action # Keep in mind you can assign values other than :controller and :action
map.connect '', :controller=>'webmail/webmail', :action=>'index' map.connect '', :controller=>'webmail', :action=>'index'
map.connect 'webmail', :controller=>'webmail/webmail', :action=>'index' map.connect 'webmail', :controller=>'webmail/webmail', :action=>'index'