Started removing the old file systems separator and replacing with the new one

This commit is contained in:
jengo 2000-08-24 21:21:21 +00:00
parent d5c20a20cd
commit 3ef5c4b3f6
2 changed files with 14 additions and 16 deletions

View File

@ -91,12 +91,9 @@
// Create the users private_dir if not exist // Create the users private_dir if not exist
/* /*
$basedir = $phpgw_info["server"]["server_root"] $sep = $phpgw->common->filesystem_sepeartor();
. $phpgw_info["server"]["dir_separator"] $basedir = $phpgw_info["server"]["server_root"] . $sep . "filemanager" . $sep
. "filemanager" . "users" . $sep;
. $phpgw_info["server"]["dir_separator"]
. "users"
. $phpgw_info["server"]["dir_separator"];
if(!is_dir($basedir . $phpgw->db->f("loginid"))) if(!is_dir($basedir . $phpgw->db->f("loginid")))
mkdir($basedir . $phpgw->db->f("loginid"), 0707); mkdir($basedir . $phpgw->db->f("loginid"), 0707);
*/ */

View File

@ -22,21 +22,22 @@
include("header.inc.php"); include("header.inc.php");
// include($phpgw_info["server"]["include_root"] . "/lang/en/" . "en" . "_logout.inc.php"); // include($phpgw_info["server"]["include_root"] . "/lang/en/" . "en" . "_logout.inc.php");
$sep = $phpgw->common->filesystem_separator();
/* /*
if ($installed[cron_apps] != "Y") { if ($installed[cron_apps] != "Y") {
$dh = opendir($phpgw_info["server"]["temp_dir"]); $dh = opendir($phpgw_info["server"]["temp_dir"]);
while ($dir = readdir($dh)) { while ($dir = readdir($dh)) {
if ($dir != "." && $dir != "..") { if ($dir != "." && $dir != "..") {
if (substr($dir,0,strlen(time())) <= (time() - 3600)) { if (substr($dir,0,strlen(time())) <= (time() - 3600)) {
echo $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"] . $phpgw_info["server"]["dir_separator"] . $dir); $fh = opendir($phpgw_info["server"]["temp_dir"] . $sep . $dir);
while ($file = readdir($fh)) { while ($file = readdir($fh)) {
if ($file != "." && $file != "..") { if ($file != "." && $file != "..") {
unlink($phpgw_info["server"]["temp_dir"] . $phpgw_info["server"]["dir_separator"] . $dir unlink($phpgw_info["server"]["temp_dir"] . $sep . $dir . $sep . $file);
. $phpgw_info["server"]["dir_separator"] . $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 ($phpgw->session->verify($sessionid)) {
if (file_exists($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"] . $phpgw_info["server"]["dir_separator"] . $phpgw->session->id); $dh = opendir($phpgw_info["server"]["temp_dir"] . $sep . $phpgw->session->id);
while ($file = readdir($dh)) { while ($file = readdir($dh)) {
if ($file != "." && $file != "..") { if ($file != "." && $file != "..") {
unlink($phpgw_info["server"]["temp_dir"] . $phpgw_info["server"]["dir_separator"] . $phpgw->session->id unlink($phpgw_info["server"]["temp_dir"] . $sep . $phpgw->session->id
. $phpgw_info["server"]["dir_separator"] . $file); . $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->session->destroy($phpgw->session->id);
$phpgw->db->query("delete from app_sessions where sessionid='" . $phpgw->session->id . "'"); $phpgw->db->query("delete from app_sessions where sessionid='" . $phpgw->session->id . "'");