fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [16105]


From: nelson . guerra
Subject: [Fmsystem-commits] [16105]
Date: Tue, 20 Dec 2016 03:51:57 +0000 (UTC)

Revision: 16105
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16105
Author:   nelson224
Date:     2016-12-20 03:51:57 +0000 (Tue, 20 Dec 2016)
Log Message:
-----------


Modified Paths:
--------------
    branches/dev-syncromind-2/phpgwapi/inc/class.vfs_sql.inc.php

Modified: branches/dev-syncromind-2/phpgwapi/inc/class.vfs_sql.inc.php
===================================================================
--- branches/dev-syncromind-2/phpgwapi/inc/class.vfs_sql.inc.php        
2016-12-19 13:48:05 UTC (rev 16104)
+++ branches/dev-syncromind-2/phpgwapi/inc/class.vfs_sql.inc.php        
2016-12-20 03:51:57 UTC (rev 16105)
@@ -1157,7 +1157,7 @@
                        (
                                'owner_id'      => $this->working_id,
                                'directory'     => $p->fake_leading_dirs_clean,
-                               'name'          => $p->fake_name_clean
+                               'name'          => $p->fake_name
                        );
 
                        $cols = implode(',', array_keys($value_set));
@@ -1167,7 +1167,7 @@
                        $query = $GLOBALS['phpgw']->db->query($sql, __LINE__, 
__FILE__);
                        
                        $last_insert_id = 
$GLOBALS['phpgw']->db->get_last_insert_id('phpgw_vfs', 'file_id');
-                       
+
                        $this->set_attributes(array(
                                'string'                => $p->fake_full_path,
                                'relatives'             => array($p->mask),
@@ -1780,7 +1780,7 @@
                        {
                                throw new Exception('nothing to copy from');
                        }
-
+                       
                        if(!is_array($data))
                        {
                                $data = array();
@@ -1919,7 +1919,7 @@
                                                        'relatives'     => 
array($data['relatives'][0])
                                                )
                                        );
-
+ 
                                        if(!$this->acl_check(array(
                                                        'string'        => 
$p->fake_full_path,
                                                        'relatives'     => 
array($p->mask),
@@ -1942,12 +1942,17 @@
                                                }
                                        }
                                        
-                                       $file_name = $t->fake_leading_dirs 
.'/'.$data['id'].'_#' .$t->fake_name_clean;
+                                       $file_name = $t->fake_leading_dirs 
.'/'.$data['id'].'_#' .$t->fake_name;
                                        $t2 = $this->path_parts(array(
                                                        'string'        => 
$file_name,
                                                        'relatives'     => 
array($data['relatives'][1])
                                                )
-                                       );      
+                                       );                                      
        
+
+                                       if (!$this->fileoperation->rename($t, 
$t2))
+                                       {
+                                               return false;
+                                       }
                                                        
                                        $query = 
$GLOBALS['phpgw']->db->query("UPDATE phpgw_vfs SET 
owner_id='{$this->working_id}',"
                                        . " 
directory='{$t2->fake_leading_dirs_clean}',"
@@ -2015,7 +2020,7 @@
                                                                . " 
directory='{$t2->fake_leading_dirs_clean}',"
                                                                . " 
name='{$t2->fake_name_clean}'"
                                                                . " WHERE 
owner_id='{$this->working_id}' AND directory='{$t->fake_leading_dirs_clean}'"
-                                                               . " AND 
name='{$GLOBALS['phpgw']->db->db_addslashes($t->fake_name_clean)}'", __LINE__, 
__FILE__);       
+                                                               . " AND 
name='{$t->fake_name_clean}'", __LINE__, __FILE__);     
 
                                                                $t = $t2;
                                                        }




reply via email to

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