Changeset 1781


Ignore:
Timestamp:
12/07/09 10:06:14 (14 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/class.uifilemanager.inc.php

    r1755 r1781  
    563563                function dir_ls() 
    564564                { 
     565                        // change dir to this->path 
     566                        $this->bo->vfs->cd(array('string' => $this->path, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); 
     567 
    565568                        reset($this->files_array); 
    566569                        $this->readFilesInfo(); 
     
    12101213                                } 
    12111214                                $viewable = array('','text/plain','text/csv','text/html', 
    1212                                         'text/text','image/jpeg','image/png','image/gif'); 
    1213  
    1214                                 if(in_array($mime_type,$viewable) || $ls_array[0]['size'] < 10240) 
     1215                                        'text/text','image/jpeg','image/png','image/gif', 
     1216                                        'audio/mpeg','video/mpeg'); 
     1217 
     1218                                if(in_array($mime_type,$viewable))  
    12151219                                { 
    12161220                                        /*Note: if you put application/octet-stream you force download */ 
     
    12181222                                        header('Content-disposition: filename="' . addslashes($this->file) . '"'); 
    12191223                                        Header("Pragma: public"); 
     1224                                } 
     1225                                else 
     1226                                { 
     1227                                        $GLOBALS['phpgw']->browser->content_header($this->file,$mime_type,$ls_array[0]['size']); 
     1228                                } 
     1229                                if ($ls_array[0]['size'] < 10240) 
     1230                                { 
    12201231                                        echo $this->bo->vfs->read(array( 
    12211232                                                'string'    => $this->path.'/'.$this->file,//FIXME 
    12221233                                                'relatives'    => array(RELATIVE_NONE) 
    12231234                                        )); 
    1224  
    12251235                                } 
    12261236                                else 
    12271237                                { 
    1228                                         $GLOBALS['phpgw']->browser->content_header($this->file,$mime_type,$ls_array[0]['size']); 
    12291238                                        $this->bo->vfs->print_content(array( 
    12301239                                                'string' => $this->path.'/'.$this->file, 
    12311240                                                'relatives' => array(RELATIVE_NONE) 
    1232                                                 ) 
    1233                                         ); 
     1241                                        ) 
     1242                                ); 
    12341243                                } 
    12351244                                $GLOBALS['phpgw']->common->phpgw_exit(); 
Note: See TracChangeset for help on using the changeset viewer.