summaryrefslogtreecommitdiffstats
path: root/util.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-05-26 22:07:26 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-05-26 22:07:26 +0000
commit5fce261ae2a1fad5a6f1e437a5245a7b1bf981f3 (patch)
treea7607908104b23e84c4793a0da1a4c79a11258f9 /util.php
parentfdc509c5c4e2e2256585889ccf0a11a1712f1316 (diff)
downloadampache-5fce261ae2a1fad5a6f1e437a5245a7b1bf981f3.tar.gz
ampache-5fce261ae2a1fad5a6f1e437a5245a7b1bf981f3.tar.bz2
ampache-5fce261ae2a1fad5a6f1e437a5245a7b1bf981f3.zip
more improvements to the caching system, removed ugly hack from last night on util
Diffstat (limited to 'util.php')
-rw-r--r--util.php30
1 files changed, 8 insertions, 22 deletions
diff --git a/util.php b/util.php
index 7d337ce4..2512cd7d 100644
--- a/util.php
+++ b/util.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) Ampache.org
+ Copyright (c) 2001 - 2007 ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
@@ -18,7 +18,6 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-define('NO_SESSION','1');
require_once 'lib/init.php';
header("Expires: Tuesday, 27 Mar 1984 05:00:00 GMT");
@@ -26,29 +25,16 @@ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Pragma: no-cache");
-$session_name = Config::get('session_name');
-
-if (!vauth::session_exists('interface',$_COOKIE[$session_name])) {
- debug_event('Util','Invalid Session:' . $_COOKIE[$session_name] . 'for session ' . $session_name,'1');
- exit;
-}
-
-$data = vauth::read($_COOKIE[$session_name]);
-
-preg_match_all("/(\w+)\|(a\:[^\|]+;})/",$data,$matches);
-
-foreach ($matches['1'] as $key=>$value) {
- if ($value == 'iframe') {
- $data = unserialize($matches['2'][$key]);
- }
-}
-
// This is a little bit of a special file, it takes the
// content of $_SESSION['iframe']['target'] and does a header
// redirect to that spot!
-if (isset($data['target'])) {
- $target = $data['target'];
- unset($data['target']);
+if (isset($_SESSION['iframe']['target'])) {
+ $target = $_SESSION['iframe']['target'];
+ unset($_SESSION['iframe']['target']);
header("Location: " . $target);
}
+else {
+ // Prevent the update query as it's pointless
+ define('NO_SESSION_UPDATE','1');
+}
?>