From 92eb0d137fb70a0b63de30f9f6a6e83d0cb68c10 Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Thu, 22 May 2008 10:46:31 +0000 Subject: [PATCH] Set parameters for session only if not started git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@409 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- design.inc.php | 2 +- index.php | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/design.inc.php b/design.inc.php index 436336b1..228be6b8 100644 --- a/design.inc.php +++ b/design.inc.php @@ -9,7 +9,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") { -<?php echo $title . (strlen($title2) ? ": " . htmlspecialchars($title2) : "") . " - " . lang('phpMinAdmin') . " 1.5.1-dev"; ?> +<?php echo $title . (strlen($title2) ? ": " . htmlspecialchars($title2) : "") . " - " . lang('phpMinAdmin') . " 1.6.1"; ?> diff --git a/index.php b/index.php index 230ef85c..1a4012d7 100644 --- a/index.php +++ b/index.php @@ -7,9 +7,12 @@ */ error_reporting(E_ALL & ~E_NOTICE); -session_name("phpMinAdmin_SID"); -session_set_cookie_params(ini_get("session.cookie_lifetime"), preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"])); -session_start(); + +if (!ini_get("session.auto_start")) { + session_name("phpMinAdmin_SID"); + session_set_cookie_params(ini_get("session.cookie_lifetime"), preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"])); + session_start(); +} $SELF = preg_replace('~^[^?]*/([^?]*).*~', '\\1?', $_SERVER["REQUEST_URI"]) . (strlen($_GET["server"]) ? 'server=' . urlencode($_GET["server"]) . '&' : '') . (strlen($_GET["db"]) ? 'db=' . urlencode($_GET["db"]) . '&' : ''); $TOKENS = &$_SESSION["tokens"][$_GET["server"]][$_SERVER["REQUEST_URI"]]; include "./functions.inc.php";