Changeset 2883


Ignore:
Timestamp:
05/31/10 11:50:36 (14 years ago)
Author:
amuller
Message:

Ticket #1094 - corrige problema de pasta vazia

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/filemanager/inc/class.uifilemanager.inc.php

    r2857 r2883  
    488488                        $owner_id = $this->bo->vfs->ownerOf($this->bo->fakebase,$path[2]); 
    489489                        $user_id = $GLOBALS['phpgw_info']['user']['account_id']; 
     490 
    490491                        if ($owner_id == $user_id) 
    491492                        { 
     
    504505                        // change dir to this->path 
    505506                        $this->bo->vfs->cd(array('string' => $this->path, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); 
     507 
    506508                        $return['permissions'] = $this->get_permissions(); 
    507509                        $return['quota']['usedSpace'] = $this->bo->vfs->get_size(array( 
    508510                                        'string'        => $this->path, 
    509511                                        'relatives'     => array(RELATIVE_NONE) 
    510                         )); 
     512                                )); 
     513 
    511514                        $return['files_count'] = $this->bo->vfs->count_files(array( 
    512515                                        'string'        => $this->path, 
     
    526529                                        continue; 
    527530                                } 
     531                                if ($files['size'] == "" && $files['name'] == "") 
     532                                        continue; 
    528533                                /* small keys to safe bandwidth */ 
    529534                                $tuple['name'] = $files['name']; 
  • trunk/phpgwapi/inc/class.vfs_sql.inc.php

    r2364 r2883  
    791791                } 
    792792                function ownerOf($base,$path){ 
    793                         $query = $GLOBALS['phpgw']->db->query ("SELECT owner_id FROM phpgw_vfs WHERE directory='". 
    794                         $GLOBALS['phpgw']->db->db_addslashes($base)."' AND name='". 
    795                         $GLOBALS['phpgw']->db->db_addslashes($path)."' ".$this->extra_sql (array ('query_type' => VFS_SQL_SELECT)), __LINE__, __FILE__); 
     793                        $query = $GLOBALS['phpgw']->db->query ("SELECT owner_id FROM phpgw_vfs WHERE ". 
     794                                "( directory='".$GLOBALS['phpgw']->db->db_addslashes($base)."' AND name='".$GLOBALS['phpgw']->db->db_addslashes($path)."' ". 
     795                                "OR directory='/home/".$GLOBALS['phpgw']->db->db_addslashes($path)."') ". 
     796                                $this->extra_sql (array ('query_type' => VFS_SQL_SELECT)), __LINE__, __FILE__); 
     797 
    796798                        $GLOBALS['phpgw']->db->next_record(); 
    797799                        $owner_id = $GLOBALS['phpgw']->db->Record['owner_id']; 
Note: See TracChangeset for help on using the changeset viewer.