[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc class.vfs_sql.inc.php, 1.15.2.6.2.8 clas
From: |
skwashd |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc class.vfs_sql.inc.php, 1.15.2.6.2.8 class.vfs_dav.inc.php, 1.1.2.4 |
Date: |
Wed, 27 Apr 2005 08:47:14 -0000 |
Update of phpgwapi/inc
Modified Files:
Branch: Version-0_9_16-branch
class.vfs_sql.inc.php lines: +31 -11
class.vfs_dav.inc.php lines: +33 -11
Log Message:
fix mkdir stuff patch 2398
====================================================
Index: phpgwapi/inc/class.vfs_sql.inc.php
diff -u phpgwapi/inc/class.vfs_sql.inc.php:1.15.2.6.2.7
phpgwapi/inc/class.vfs_sql.inc.php:1.15.2.6.2.8
--- phpgwapi/inc/class.vfs_sql.inc.php:1.15.2.6.2.7 Wed Nov 26 21:28:19 2003
+++ phpgwapi/inc/class.vfs_sql.inc.php Fri Jan 9 09:18:41 2004
@@ -1253,11 +1253,14 @@
else /* It's a directory */
{
/* First, make the initial directory */
- $this->mkdir (array(
+ if ($this->mkdir (array(
'string' => $data['to'],
'relatives' => array
($data['relatives'][1])
- )
- );
+ )) === False
+ )
+ {
+ return False;
+ }
/* Next, we create all the directories below
the initial directory */
$ls = $this->ls (array(
@@ -1271,11 +1274,14 @@
while (list ($num, $entry) = each ($ls))
{
$newdir = ereg_replace
("^$f->fake_full_path", "$t->fake_full_path", $entry['directory']);
- $this->mkdir (array(
+ if ($this->mkdir (array(
'string' =>
$newdir.'/'.$entry['name'],
'relatives' =>
array ($t->mask)
- )
- );
+ )) === False
+ )
+ {
+ return False;
+ }
}
/* Lastly, we copy the files over */
@@ -1768,7 +1774,14 @@
@mkdir ($this->basedir.'/home', 0770);
}
- if (address@hidden ($p->real_full_path, 0770))
+ if (file_exists($p->real_full_path))
+ {
+ if (!is_dir($p->real_full_path))
+ {
+ return False;
+ }
+ }
+ elseif (address@hidden ($p->real_full_path,
0770))
{
return False;
}
@@ -1859,11 +1872,18 @@
return False;
}
- if ((!$this->file_exists (array(
+ if ($this->file_exists (array(
'string' => $rp->real_full_path,
'relatives' => array ($rp->mask)
- )))
- && !mkdir ($rp->real_full_path, 0770))
+ ))
+ )
+ {
+ if (!is_dir ($rp->real_full_path))
+ {
+ return False;
+ }
+ }
+ elseif (!mkdir ($rp->real_full_path, 0770))
{
return False;
}
====================================================
Index: phpgwapi/inc/class.vfs_dav.inc.php
diff -u phpgwapi/inc/class.vfs_dav.inc.php:1.1.2.3
phpgwapi/inc/class.vfs_dav.inc.php:1.1.2.4
--- phpgwapi/inc/class.vfs_dav.inc.php:1.1.2.3 Mon Sep 8 01:27:44 2003
+++ phpgwapi/inc/class.vfs_dav.inc.php Fri Jan 9 09:18:41 2004
@@ -1635,11 +1635,14 @@
else /* It's a directory, and one of the files is
local */
{
/* First, make the initial directory */
- $this->mkdir (array(
+ if ($this->mkdir (array(
'string' => $data['to'],
'relatives' => array
($data['relatives'][1])
- )
- );
+ )) === False
+ )
+ {
+ return False;
+ }
/* Next, we create all the directories below
the initial directory */
$ls = $this->ls (array(
@@ -1653,11 +1656,14 @@
while (list ($num, $entry) = each ($ls))
{
$newdir = ereg_replace
("^$f->fake_full_path", "$t->fake_full_path", $entry['directory']);
- $this->mkdir (array(
+ if ($this->mkdir (array(
'string' =>
$newdir.'/'.$entry['name'],
'relatives' =>
array ($t->mask)
- )
- );
+ )) === False
+ )
+ {
+ return False;
+ }
}
/* Lastly, we copy the files over */
@@ -2047,7 +2053,14 @@
}
if ($p->outside)
{
- if (!mkdir($p->real_full_path, 0777))
+ if (file_exists($p->real_full_path))
+ {
+ if (!is_dir($p->real_full_path))
+ {
+ return False;
+ }
+ }
+ elseif (!mkdir($p->real_full_path, 0777))
{
return False;
}
@@ -2134,11 +2147,20 @@
))
) return False;
- if ((!$this->file_exists (array(
+ if ($this->file_exists (array(
'string' => $rp->real_full_path,
'relatives' => array ($rp->mask)
- )))
- && !mkdir ($rp->real_full_path, 0770)) return
False;
+ )))
+ {
+ if (!is_dir($rp->real_full_path))
+ {
+ return False;
+ }
+ }
+ elseif (!mkdir ($rp->real_full_path, 0770))
+ {
+ return False;
+ }
if (!$this->mkdir (array(
'string' => $vp->fake_full_path,
- Prev by Date:
[Phpgroupware-cvs] projects/setup phpgw_de.lang, 1.29 phpgw_en.lang, 1.41 setup.inc.php, 1.29 tables_update.inc.php, 1.27 tables_current.inc.php, 1.21
- Next by Date:
[Phpgroupware-cvs] phpgwapi/inc class.common.inc.php, 1.123.2.9.2.20 class.auth_ldap.inc.php, 1.17.2.1.2.2 class.accounts_ldap.inc.php, 1.101.2.13.2.11 class.accounts.inc.php, 1.10.4.5
- Previous by thread:
[Phpgroupware-cvs] phpgwapi/inc class.vfs_sql.inc.php, 1.15.2.6.2.8 class.vfs_dav.inc.php, 1.1.2.4
- Next by thread:
[Phpgroupware-cvs] api/setup setup.xml,1.1.1.1.2.6
- Index(es):