diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-12-10 06:03:47 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-12-10 06:03:47 +0000 |
commit | 46ffeca144b7ef44572a5805061da246c8be5f3c (patch) | |
tree | 2b338376bb6e4a77839607131c22f20e6a59cb8d /lib/general.lib.php | |
parent | 0d2c89e90d7c64eba058ae375760a350d336578b (diff) | |
download | ampache-46ffeca144b7ef44572a5805061da246c8be5f3c.tar.gz ampache-46ffeca144b7ef44572a5805061da246c8be5f3c.tar.bz2 ampache-46ffeca144b7ef44572a5805061da246c8be5f3c.zip |
database update, cleaned up some stuff
Diffstat (limited to 'lib/general.lib.php')
-rw-r--r-- | lib/general.lib.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/general.lib.php b/lib/general.lib.php index eab84a73..60a461d0 100644 --- a/lib/general.lib.php +++ b/lib/general.lib.php @@ -521,11 +521,22 @@ function get_languages() { */ function logout() { + // Do a quick check to see if this is an AJAX'd logout request + // if so use the iframe to redirect + if (AJAX_INCLUDE == '1') { + $_SESSION['iframe']['target'] = Config::get('web_path') . '/login.php'; + $results['rfc3514'] = '<script type="text/javascript">reload_util("'.$_SESSION['iframe']['target'].'")</script>'; + echo xml_from_array($results); + } + /* First destory their session */ vauth_logout(session_id()); + /* Redirect them to the login page */ - header ('Location: ' . Config::get('web_path') . '/login.php'); + if (AJAX_INCLUDE != '1') { + header ('Location: ' . Config::get('web_path') . '/login.php'); + } return true; |