diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2012-03-01 23:58:35 -0500 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2012-03-01 23:58:35 -0500 |
commit | 69ec29517deb942b2f7c263bdcd3eeccef2fbf4a (patch) | |
tree | 97044fb36dfb0c61f01ae2e408400a63bdb15d83 /lib/init.php | |
parent | dd3d42d644a790afe9368a122e0f7f6b9e60697c (diff) | |
download | ampache-69ec29517deb942b2f7c263bdcd3eeccef2fbf4a.tar.gz ampache-69ec29517deb942b2f7c263bdcd3eeccef2fbf4a.tar.bz2 ampache-69ec29517deb942b2f7c263bdcd3eeccef2fbf4a.zip |
Move session extension outside the auth block in init.php
This might help ensure that we're always extending the session when we
should.
Diffstat (limited to 'lib/init.php')
-rw-r--r-- | lib/init.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/init.php b/lib/init.php index bf9143d9..cab634c8 100644 --- a/lib/init.php +++ b/lib/init.php @@ -200,8 +200,6 @@ if (!defined('NO_SESSION') && Config::get('use_auth')) { /* If the user ID doesn't exist deny them */ if (!$GLOBALS['user']->id AND !Config::get('demo_mode')) { vauth::logout(session_id()); exit; } - vauth::session_extend(session_id()); - /* Load preferences and theme */ $GLOBALS['user']->update_last_seen(); } @@ -254,8 +252,9 @@ else { // Load the Preferences from the database Preference::init(); -// We need to create the tmp playlist for our user only if we have a session if (session_id()) { + vauth::session_extend(session_id()); + // We only need to create the tmp playlist if we have a session $GLOBALS['user']->load_playlist(); } |