Ignore:
Timestamp:
12/03/09 10:31:28 (15 years ago)
Author:
amuller
Message:

Ticket #597 - Melhorias no módulos gerenciador de arquivos do expresso livre

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/filemanager/inc/upload.php

    r1694 r1741  
    9595                        { 
    9696 
    97                                 $bo->vfs->cp(array( 
     97                                if ($bo->vfs->cp(array( 
    9898                                        'from'=> $_FILES['upload_file']['tmp_name'][$i], 
    9999                                        'to'=> $_FILES['upload_file']['name'][$i], 
    100100                                        'relatives'     => array(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL) 
    101                                 )); 
    102  
    103                                 $bo->vfs->set_attributes(array( 
    104                                         'string'=> $_FILES['upload_file']['name'][$i], 
    105                                         'relatives'     => array(RELATIVE_ALL), 
    106                                         'attributes'=> array( 
     101                                ))) 
     102                                        $bo->vfs->set_attributes(array( 
     103                                                'string'=> $_FILES['upload_file']['name'][$i], 
     104                                                'relatives'     => array(RELATIVE_ALL), 
     105                                                'attributes'=> array( 
    107106                                                'mime_type' => $_FILES['upload_file']['type'][$i], 
    108107                                                'comment' => stripslashes($_POST['upload_comment'][$i]) 
    109108                                        ) 
    110109                                )); 
     110                                else{ 
     111                                        $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Error:').lang('Your quota has exceeded the limit'); 
     112                                        return false; 
     113                                } 
    111114 
    112                                  $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Created %1,%2', $_FILES['upload_file']['name'][$i], $_FILES['upload_file']['size'][$i])."\n"; 
     115                                 $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Created %1,%2', $_FILES['upload_file']['name'][$i], $bo->borkb($_FILES['upload_file']['size'][$i]))."\n"; 
    113116                        } 
    114117                } 
     
    129132                        )); 
    130133 
    131                          $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Created %1,%2', $_FILES['upload_file']['name'][$i], $file_size[$i])."\n"; 
     134                         $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Created %1,%2', $_FILES['upload_file']['name'][$i], $bo->borkb($file_size[$i]))."\n"; 
    132135 
    133136                } 
Note: See TracChangeset for help on using the changeset viewer.