Changeset 1781
- Timestamp:
- 12/07/09 10:06:14 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/filemanager/inc/class.uifilemanager.inc.php
r1755 r1781 563 563 function dir_ls() 564 564 { 565 // change dir to this->path 566 $this->bo->vfs->cd(array('string' => $this->path, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); 567 565 568 reset($this->files_array); 566 569 $this->readFilesInfo(); … … 1210 1213 } 1211 1214 $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)) 1215 1219 { 1216 1220 /*Note: if you put application/octet-stream you force download */ … … 1218 1222 header('Content-disposition: filename="' . addslashes($this->file) . '"'); 1219 1223 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 { 1220 1231 echo $this->bo->vfs->read(array( 1221 1232 'string' => $this->path.'/'.$this->file,//FIXME 1222 1233 'relatives' => array(RELATIVE_NONE) 1223 1234 )); 1224 1225 1235 } 1226 1236 else 1227 1237 { 1228 $GLOBALS['phpgw']->browser->content_header($this->file,$mime_type,$ls_array[0]['size']);1229 1238 $this->bo->vfs->print_content(array( 1230 1239 'string' => $this->path.'/'.$this->file, 1231 1240 'relatives' => array(RELATIVE_NONE) 1232 1233 1241 ) 1242 ); 1234 1243 } 1235 1244 $GLOBALS['phpgw']->common->phpgw_exit();
Note: See TracChangeset
for help on using the changeset viewer.