summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-08-28 07:55:51 +0000
committerStan Hu <stanhu@gmail.com>2015-08-28 07:55:51 +0000
commita429eb4d455cabde26c5cdf8a3b38e65966531dc (patch)
tree35100c171aa4528a66725b4b3c58cac1d76b356c
parent53698401fb15d7e69514bb48217711d060fd9e46 (diff)
parent23aee0ca8ad3de5697f770696f3e55fbfdba2be8 (diff)
downloadgitlab-ce-a429eb4d455cabde26c5cdf8a3b38e65966531dc.tar.gz
Merge branch 'fix-session_expire_delay' into 'master'
read session_expire_delay from database if table & column exists; Previous code only ends up using the default value for session_expire_delay, not the value stored in the database, making the session always 1 week. See merge request !1217
-rw-r--r--lib/gitlab/current_settings.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb
index 1a2a50a14d0..7ad3ed8728f 100644
--- a/lib/gitlab/current_settings.rb
+++ b/lib/gitlab/current_settings.rb
@@ -4,7 +4,7 @@ module Gitlab
key = :current_application_settings
RequestStore.store[key] ||= begin
- if ActiveRecord::Base.connected? && ActiveRecord::Base.connection.table_exists?('application_settings')
+ if ActiveRecord::Base.connection.active? && ActiveRecord::Base.connection.table_exists?('application_settings')
ApplicationSetting.current || ApplicationSetting.create_from_defaults
else
fake_application_settings