webmail_controller moded from components to app

master-old
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
config/database.yml
.*.sw?
config/site.rb

View File

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

View File

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

View File

@ -1,7 +1,7 @@
require 'cdfutils'
require 'mail2screen'
module Webmail::WebmailHelper
module WebmailHelper
include Mail2Screen
def link_folders
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:
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
# 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'