phpgroupware-cvs
[Top][All Lists]
Advanced

[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 07:31:12 -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,






reply via email to

[Prev in Thread] Current Thread [Next in Thread]