aboutsummaryrefslogtreecommitdiffstats
path: root/functions/admin_functions.php
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2008-12-28 10:50:57 +0000
committerJim Hu <jimhu@users.sourceforge.net>2008-12-28 10:50:57 +0000
commitd6405b94fff1853f6654ecb85eea79721827b6ca (patch)
tree94eed54194dc8ff3aa2512d66816a0f7e60fc5bb /functions/admin_functions.php
parentbbfbcfca381146e0ca2a161616513cf2e66f3337 (diff)
downloadphpicalendar-d6405b94fff1853f6654ecb85eea79721827b6ca.tar.gz
phpicalendar-d6405b94fff1853f6654ecb85eea79721827b6ca.tar.bz2
phpicalendar-d6405b94fff1853f6654ecb85eea79721827b6ca.zip
kill admin.php; misc other changes; bump rc num
Diffstat (limited to 'functions/admin_functions.php')
-rw-r--r--functions/admin_functions.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/functions/admin_functions.php b/functions/admin_functions.php
index f396a28..d62c077 100644
--- a/functions/admin_functions.php
+++ b/functions/admin_functions.php
@@ -47,10 +47,10 @@ function login ($username, $password) {
// arg1: string password
// returns boolean was login successful
function login_ftp ($username, $password) {
- global $ftp_server, $ftp_port;
+ global $phpiCal_config;
// set up basic connection
- $conn_id = @ftp_connect($ftp_server, $ftp_port);
+ $conn_id = @ftp_connect($phpiCal_config->ftp_server, $phpiCal_config->ftp_port);
if (!$conn_id) exit(error('Cannot connect to FTP server', $filename));
// login with username and password
$login_result = @ftp_login($conn_id, $username, $password);
@@ -88,6 +88,7 @@ function delete_cal ($filename) {
global $_SESSION;
global $phpiCal_config;
global $calendar_path;
+ echo $filename;
if ($phpiCal_config->auth_method == 'ftp') {
$filename = get_ftp_calendar_path() . "/" . $filename;
@@ -115,12 +116,11 @@ function delete_cal ($filename) {
return TRUE;
} else {
#$filename = $calendar_path . "/" . $filename;
-
$delete = unlink($filename);
clearstatcache();
if (@file_exists($filename)) {
$filesys = eregi_replace("/","\\", $filename);
- $delete = system("del $filesys");
+ $delete = system("rm -f $filesys");
clearstatcache();
if (@file_exists($filename)) {
$delete = chmod ($filename, 0775);

© 2014-2024 Faster IT GmbH | imprint | privacy policy