mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-06 03:49:56 +02:00
remove redundent UPDATE on session table due to /util.php should make high-traffic sites faster, most likely will not notice the query redunction
This commit is contained in:
parent
97bcd21404
commit
a919e9b280
3 changed files with 15 additions and 6 deletions
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
||||||
v.3.5-Alpha1
|
v.3.5-Alpha1
|
||||||
|
- Removed redundent UPDATE on session table due to /util.php
|
||||||
- Added Batch Download to single Artist view
|
- Added Batch Download to single Artist view
|
||||||
- Added back in the direct links on songs, requires download set
|
- Added back in the direct links on songs, requires download set
|
||||||
to enabled as it's essentially the same thing except with
|
to enabled as it's essentially the same thing except with
|
||||||
|
|
|
@ -251,13 +251,12 @@ unset($results);
|
||||||
flip_class(array('odd','even'));
|
flip_class(array('odd','even'));
|
||||||
|
|
||||||
/* Check to see if we need to perform an update */
|
/* Check to see if we need to perform an update */
|
||||||
if (! preg_match('/update\.php/', $_SERVER['PHP_SELF'])) {
|
if (!preg_match('/update\.php/', $_SERVER['PHP_SELF'])) {
|
||||||
if (Update::need_update()) {
|
if (Update::need_update()) {
|
||||||
header("Location: " . Config::get('web_path') . "/update.php");
|
header("Location: " . Config::get('web_path') . "/update.php");
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// For the XMLRPC stuff
|
// For the XMLRPC stuff
|
||||||
$GLOBALS['xmlrpc_internalencoding'] = Config::get('site_charset');
|
$GLOBALS['xmlrpc_internalencoding'] = Config::get('site_charset');
|
||||||
?>
|
?>
|
||||||
|
|
17
util.php
17
util.php
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
|
|
||||||
Copyright (c) 2001 - 2007 ampache.org
|
Copyright (c) Ampache.org
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
|
@ -18,6 +18,7 @@
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
define('NO_SESSION','1');
|
||||||
require_once 'lib/init.php';
|
require_once 'lib/init.php';
|
||||||
|
|
||||||
header("Expires: Tuesday, 27 Mar 1984 05:00:00 GMT");
|
header("Expires: Tuesday, 27 Mar 1984 05:00:00 GMT");
|
||||||
|
@ -25,12 +26,20 @@ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
header("Pragma: no-cache");
|
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]);
|
||||||
// This is a little bit of a special file, it takes the
|
// This is a little bit of a special file, it takes the
|
||||||
// content of $_SESSION['iframe']['target'] and does a header
|
// content of $_SESSION['iframe']['target'] and does a header
|
||||||
// redirect to that spot!
|
// redirect to that spot!
|
||||||
if (isset($_SESSION['iframe']['target'])) {
|
if (isset($data['iframe']['target'])) {
|
||||||
$target = $_SESSION['iframe']['target'];
|
$target = $data['iframe']['target'];
|
||||||
unset($_SESSION['iframe']['target']);
|
unset($data['iframe']['target']);
|
||||||
header("Location: " . $target);
|
header("Location: " . $target);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue