@@ -52,14 +52,14 class AccountController < ApplicationController | |||
|
52 | 52 | # Log out current user and redirect to welcome page |
|
53 | 53 | def logout |
|
54 | 54 | self.logged_in_user = nil |
|
55 | redirect_to :controller => '' | |
|
55 | redirect_to :controller => 'welcome' | |
|
56 | 56 | end |
|
57 | 57 | |
|
58 | 58 | # Enable user to choose a new password |
|
59 | 59 | def lost_password |
|
60 | 60 | if params[:token] |
|
61 | 61 | @token = Token.find_by_action_and_value("recovery", params[:token]) |
|
62 | redirect_to :controller => '' and return unless @token and !@token.expired? | |
|
62 | redirect_to :controller => 'welcome' and return unless @token and !@token.expired? | |
|
63 | 63 | @user = @token.user |
|
64 | 64 | if request.post? |
|
65 | 65 | @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation] |
@@ -95,12 +95,12 class AccountController < ApplicationController | |||
|
95 | 95 | |
|
96 | 96 | # User self-registration |
|
97 | 97 | def register |
|
98 | redirect_to :controller => '' and return unless Setting.self_registration? | |
|
98 | redirect_to :controller => 'welcome' and return unless Setting.self_registration? | |
|
99 | 99 | if params[:token] |
|
100 | 100 | token = Token.find_by_action_and_value("register", params[:token]) |
|
101 | redirect_to :controller => '' and return unless token and !token.expired? | |
|
101 | redirect_to :controller => 'welcome' and return unless token and !token.expired? | |
|
102 | 102 | user = token.user |
|
103 | redirect_to :controller => '' and return unless user.status == User::STATUS_REGISTERED | |
|
103 | redirect_to :controller => 'welcome' and return unless user.status == User::STATUS_REGISTERED | |
|
104 | 104 | user.status = User::STATUS_ACTIVE |
|
105 | 105 | if user.save |
|
106 | 106 | token.destroy |
@@ -125,7 +125,7 class AccountController < ApplicationController | |||
|
125 | 125 | Mailer.set_language_if_valid(@user.language) |
|
126 | 126 | Mailer.deliver_register(token) |
|
127 | 127 | flash[:notice] = l(:notice_account_register_done) |
|
128 | redirect_to :controller => '' | |
|
128 | redirect_to :controller => 'welcome' and return | |
|
129 | 129 | end |
|
130 | 130 | end |
|
131 | 131 | end |
@@ -92,16 +92,16 class ApplicationController < ActionController::Base | |||
|
92 | 92 | # store current uri in session. |
|
93 | 93 | # return to this location by calling redirect_back_or_default |
|
94 | 94 | def store_location |
|
95 |
session[:return_to] = |
|
|
95 | session[:return_to_params] = params | |
|
96 | 96 | end |
|
97 | 97 | |
|
98 | 98 | # move to the last store_location call or to the passed default one |
|
99 | 99 | def redirect_back_or_default(default) |
|
100 | if session[:return_to].nil? | |
|
100 | if session[:return_to_params].nil? | |
|
101 | 101 | redirect_to default |
|
102 | 102 | else |
|
103 |
redirect_to |
|
|
104 | session[:return_to] = nil | |
|
103 | redirect_to session[:return_to_params] | |
|
104 | session[:return_to_params] = nil | |
|
105 | 105 | end |
|
106 | 106 | end |
|
107 | 107 |
@@ -2,7 +2,7 xml.instruct! | |||
|
2 | 2 | xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do |
|
3 | 3 | xml.channel do |
|
4 | 4 | xml.title "#{Setting.app_title}: #{l(:label_news_latest)}" |
|
5 | xml.link url_for(:controller => '', :only_path => false) | |
|
5 | xml.link url_for(:controller => 'welcome', :only_path => false) | |
|
6 | 6 | xml.pubDate CGI.rfc1123_date(@news.first.created_on) |
|
7 | 7 | xml.description l(:label_news_latest) |
|
8 | 8 | @news.each do |news| |
@@ -33,7 +33,7 | |||
|
33 | 33 | |
|
34 | 34 | <div id="navigation"> |
|
35 | 35 | <ul> |
|
36 | <li><%= link_to l(:label_home), { :controller => '' }, :class => "icon icon-home" %></li> | |
|
36 | <li><%= link_to l(:label_home), { :controller => 'welcome' }, :class => "icon icon-home" %></li> | |
|
37 | 37 | <li><%= link_to l(:label_my_page), { :controller => 'my', :action => 'page'}, :class => "icon icon-mypage" %></li> |
|
38 | 38 | <li><%= link_to l(:label_project_plural), { :controller => 'projects' }, :class => "icon icon-projects" %></li> |
|
39 | 39 |
General Comments 0
You need to be logged in to leave comments.
Login now