From d3176c22e90e0a09b22790036f1f61fc926912c9 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Sat, 15 Dec 2007 08:54:54 +0000 Subject: added little note on access add as to the defaults, fixed api to use session_length added check for session functions with redirect to /test.php on failure --- docs/CHANGELOG | 2 ++ lib/class/api.class.php | 2 +- modules/vauth/session.lib.php | 7 +++++++ templates/show_add_access.inc.php | 4 +++- themes/classic/templates/default.css | 6 ++++++ 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 6d0ade3f..10ddbc6f 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,8 @@ -------------------------------------------------------------------------- v.3.4-Alpha4 + - Added function exists check for session with redirect to /test.php + on failure - Fixed incorrect extension and stream command being sent when using transcode for type other then mp3 - Fixed default flac downsample command, removed -r as flac decode diff --git a/lib/class/api.class.php b/lib/class/api.class.php index 592ae953..40cff61f 100644 --- a/lib/class/api.class.php +++ b/lib/class/api.class.php @@ -104,7 +104,7 @@ class Api { $token = md5(uniqid(rand(), true)); $level = Dba::escape($level); $agent = Dba::escape($_SERVER['HTTP_USER_AGENT']); - $expire = time() + 3600; + $expire = time() + Config::('session_length'); $sql = "REPLACE INTO `session_api` (`id`,`user`,`agent`,`level`,`expire`,`ip`) " . "VALUES ('$token','$user_id','$agent','$level','$expire','$ip')"; diff --git a/modules/vauth/session.lib.php b/modules/vauth/session.lib.php index 36931d68..ef91a473 100644 --- a/modules/vauth/session.lib.php +++ b/modules/vauth/session.lib.php @@ -25,6 +25,13 @@ * and then contains the functions that the session handler references */ +// Quick check for the session functions if they don't exist redirect to /test.php +if (!function_exists('session_set_save_handler')) { + header("Location: " . Config::get('web_path') . "/test.php"); + debug_event('ERROR','Missing PHP Session Module','1'); + exit; +} + /* Always register the customer handler */ session_set_save_handler( 'vauth_sess_open', diff --git a/templates/show_add_access.inc.php b/templates/show_add_access.inc.php index 8cea9ab6..28f592a1 100644 --- a/templates/show_add_access.inc.php +++ b/templates/show_add_access.inc.php @@ -32,12 +32,14 @@ : + (0.0.0.0) : + (0.0.0.0) @@ -74,7 +76,7 @@ : - + diff --git a/themes/classic/templates/default.css b/themes/classic/templates/default.css index 06fabf73..ba71d503 100644 --- a/themes/classic/templates/default.css +++ b/themes/classic/templates/default.css @@ -682,3 +682,9 @@ a.button{padding:1px 3px;} display: none; text-indent:-9999em; } + +.information { + font-size: 0.9em; + font-style: italic; + color: #c0c0c0; +} -- cgit