Changeset 3936
- Timestamp:
- 03/31/11 16:51:47 (13 years ago)
- Location:
- branches/2.2/filemanager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/filemanager/inc/class.uifilemanager.inc.php
r3913 r3936 1038 1038 } 1039 1039 1040 function export() { 1041 if ($this->file) { 1040 function export() 1041 { 1042 if ($this->file) 1043 { 1042 1044 $ls_array = $this->bo->vfs->ls(array( 1043 1045 'string' => $this->path . '/' . $this->file, … … 1046 1048 'nofiles' => True 1047 1049 )); 1048 /* $timestamp = $this->vfs_functions->dateString2timeStamp($ls_array[0]['modified']); 1049 if (time() - $timestamp < 60 && $ls_array[0]['modifiedby_id'] != $GLOBALS['phpgw_info']['user']['account_id']); 1050 { 1051 // recently than last minute: someone is editing 1052 } */ 1050 1053 1051 $mime_type = $ls_array[0]['mime_type']; 1052 1054 1053 $formats = array('text/html'); 1055 if (!in_array($mime_type, $formats)) { 1054 1055 if (!in_array($mime_type, $formats)) 1056 { 1056 1057 echo lang('Impossible to export this file'); 1057 1058 return False; 1058 1059 } 1060 1059 1061 $content = $this->bo->vfs->read(array('string' => $this->path . '/' . $this->file, 1060 1062 'relatives' => array(RELATIVE_NONE) … … 1062 1064 1063 1065 include_once('filemanager/tp/dompdf/dompdf_config.inc.php'); 1066 1064 1067 $dompdf = new DOMPDF(); 1065 1068 $dompdf->load_html($content); -
branches/2.2/filemanager/js/draw_api.js
r3924 r3936 334 334 { 335 335 case 'text/html': 336 retBuff += '<td><a href="./index.php?menuaction=filemanager.uifilemanager.export&file='+base64_encode(file.name)+'&path='+base64_encode(currentPath)+'"><div class="exportButton" alt="'+get_lang('export')+'" title="'+get_lang('export')+'"></div></a></td>'; 336 if( file.size > 0 ) 337 retBuff += '<td><a href="./index.php?menuaction=filemanager.uifilemanager.export&file='+base64_encode(file.name)+'&path='+base64_encode(currentPath)+'"><div class="exportButton" alt="'+get_lang('export')+'" title="'+get_lang('export')+'"></div></a></td>'; 338 else 339 retBuff += '<td><a href="javascript:void();"></a></td>'; 337 340 break; 338 341 case 'application/zip':
Note: See TracChangeset
for help on using the changeset viewer.