diff options
Diffstat (limited to 'install/index.php')
-rwxr-xr-x | install/index.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/install/index.php b/install/index.php index 77e50864..81fd407a 100755 --- a/install/index.php +++ b/install/index.php | |||
@@ -16,6 +16,26 @@ $email = ""; | |||
16 | 16 | ||
17 | require_once('install_functions.php'); | 17 | require_once('install_functions.php'); |
18 | 18 | ||
19 | // Start by destroying session to avoid wrong logins from previous installations | ||
20 | // cookie part | ||
21 | $cookiedir = ''; | ||
22 | if (dirname($_SERVER['SCRIPT_NAME'])!='/') { | ||
23 | $cookiedir = dirname($_SERVER["SCRIPT_NAME"]).'/'; | ||
24 | } | ||
25 | |||
26 | if (isset($_SERVER['HTTP_COOKIE'])) { | ||
27 | $cookies = explode(';', $_SERVER['HTTP_COOKIE']); | ||
28 | foreach($cookies as $cookie) { | ||
29 | $parts = explode('=', $cookie); | ||
30 | $name = trim($parts[0]); | ||
31 | setcookie($name, '', time()-1000); | ||
32 | setcookie($name, '', time()-1000, $cookiedir); | ||
33 | } | ||
34 | } | ||
35 | // session part | ||
36 | session_destroy(); | ||
37 | |||
38 | |||
19 | if (isset($_GET['clean'])) { | 39 | if (isset($_GET['clean'])) { |
20 | if (is_dir('install')){ | 40 | if (is_dir('install')){ |
21 | delTree('install', true); | 41 | delTree('install', true); |