Merge branch 'vacation-work'

This commit is contained in:
Reinier Balt 2010-05-05 15:27:39 +02:00
commit 0a95d430d4
22 changed files with 171 additions and 105 deletions

View file

@ -54,7 +54,7 @@ class LoginController < ApplicationController
end
when :get
if User.no_users_yet?
redirect_to :controller => 'users', :action => 'new'
redirect_to signup_path
return
end
end

View file

@ -319,6 +319,7 @@ class StatsController < ApplicationController
# - actions not part of a hidden project
# - actions not part of a hidden context
# - actions not deferred (show_from must be null)
# - actions not pending/blocked
@actions_running_time = @actions.find_by_sql([
"SELECT t.created_at "+
@ -326,7 +327,7 @@ class StatsController < ApplicationController
"WHERE t.user_id=? "+
"AND t.completed_at IS NULL " +
"AND t.show_from IS NULL " +
"AND NOT (p.state='hidden' OR c.hide=?) " +
"AND NOT (p.state='hidden' OR p.state='pending' OR c.hide=?) " +
"ORDER BY t.created_at ASC", @user.id, true]
)

View file

@ -90,7 +90,7 @@ class UsersController < ApplicationController
unless user.valid?
session['new_user'] = user
redirect_to :action => 'new'
redirect_to signup_path
return
end