diff --git a/login.php b/login.php index 0436bbf243..ea8089be09 100755 --- a/login.php +++ b/login.php @@ -91,12 +91,9 @@ // Create the users private_dir if not exist /* - $basedir = $phpgw_info["server"]["server_root"] - . $phpgw_info["server"]["dir_separator"] - . "filemanager" - . $phpgw_info["server"]["dir_separator"] - . "users" - . $phpgw_info["server"]["dir_separator"]; + $sep = $phpgw->common->filesystem_sepeartor(); + $basedir = $phpgw_info["server"]["server_root"] . $sep . "filemanager" . $sep + . "users" . $sep; if(!is_dir($basedir . $phpgw->db->f("loginid"))) mkdir($basedir . $phpgw->db->f("loginid"), 0707); */ diff --git a/logout.php b/logout.php index 14249f8da6..b11a820bb5 100755 --- a/logout.php +++ b/logout.php @@ -22,21 +22,22 @@ include("header.inc.php"); // include($phpgw_info["server"]["include_root"] . "/lang/en/" . "en" . "_logout.inc.php"); + $sep = $phpgw->common->filesystem_separator(); + /* if ($installed[cron_apps] != "Y") { $dh = opendir($phpgw_info["server"]["temp_dir"]); while ($dir = readdir($dh)) { if ($dir != "." && $dir != "..") { if (substr($dir,0,strlen(time())) <= (time() - 3600)) { - echo $phpgw_info["server"]["temp_dir"] . $phpgw_info["server"]["dir_separator"] . $dir; - $fh = opendir($phpgw_info["server"]["temp_dir"] . $phpgw_info["server"]["dir_separator"] . $dir); + echo $phpgw_info["server"]["temp_dir"] . $sep . $dir; + $fh = opendir($phpgw_info["server"]["temp_dir"] . $sep . $dir); while ($file = readdir($fh)) { if ($file != "." && $file != "..") { - unlink($phpgw_info["server"]["temp_dir"] . $phpgw_info["server"]["dir_separator"] . $dir - . $phpgw_info["server"]["dir_separator"] . $file); + unlink($phpgw_info["server"]["temp_dir"] . $sep . $dir . $sep . $file); } } - rmdir($phpgw_info["server"]["temp_dir"] . $phpgw_info["server"]["dir_separator"] . $dir); + rmdir($phpgw_info["server"]["temp_dir"] . $sep . $dir); } } } @@ -52,16 +53,16 @@ if ($phpgw->session->verify($sessionid)) { - if (file_exists($phpgw_info["server"]["temp_dir"] . $phpgw_info["server"]["dir_separator"] . $phpgw->session->id)) { - $dh = opendir($phpgw_info["server"]["temp_dir"] . $phpgw_info["server"]["dir_separator"] . $phpgw->session->id); + if (file_exists($phpgw_info["server"]["temp_dir"] . $sep . $phpgw->session->id)) { + $dh = opendir($phpgw_info["server"]["temp_dir"] . $sep . $phpgw->session->id); while ($file = readdir($dh)) { if ($file != "." && $file != "..") { - unlink($phpgw_info["server"]["temp_dir"] . $phpgw_info["server"]["dir_separator"] . $phpgw->session->id - . $phpgw_info["server"]["dir_separator"] . $file); + unlink($phpgw_info["server"]["temp_dir"] . $sep . $phpgw->session->id + . $sep . $file); } } - rmdir($phpgw_info["server"]["temp_dir"] . $phpgw_info["server"]["dir_separator"] . $phpgw->session->id); + rmdir($phpgw_info["server"]["temp_dir"] . $sep . $phpgw->session->id); } $phpgw->session->destroy($phpgw->session->id); $phpgw->db->query("delete from app_sessions where sessionid='" . $phpgw->session->id . "'");