Fix: Mime detection
This commit is contained in:
parent
32e248de16
commit
3687dc8be9
@ -234,10 +234,10 @@ function dol_mimetype($file,$default='application/octet-stream',$mode=0)
|
|||||||
if (preg_match('/\.mdb$/i',$tmpfile)) { $mime='application/msaccess'; $imgmime='mdb.png'; }
|
if (preg_match('/\.mdb$/i',$tmpfile)) { $mime='application/msaccess'; $imgmime='mdb.png'; }
|
||||||
if (preg_match('/\.doc(x|m)?$/i',$tmpfile)) { $mime='application/msword'; $imgmime='doc.png'; }
|
if (preg_match('/\.doc(x|m)?$/i',$tmpfile)) { $mime='application/msword'; $imgmime='doc.png'; }
|
||||||
if (preg_match('/\.dot(x|m)?$/i',$tmpfile)) { $mime='application/msword'; $imgmime='doc.png'; }
|
if (preg_match('/\.dot(x|m)?$/i',$tmpfile)) { $mime='application/msword'; $imgmime='doc.png'; }
|
||||||
if (preg_match('/\.xls(b|m|x)?$/i',$tmpfile)) { $mime='application/vnd.ms-excel'; $imgmime='xls.png'; }
|
|
||||||
if (preg_match('/\.xlt(x)?$/i',$tmpfile)) { $mime='application/vnd.ms-excel'; $imgmime='xls.png'; }
|
if (preg_match('/\.xlt(x)?$/i',$tmpfile)) { $mime='application/vnd.ms-excel'; $imgmime='xls.png'; }
|
||||||
if (preg_match('/\.xla(m)?$/i',$tmpfile)) { $mime='application/vnd.ms-excel'; $imgmime='xls.png'; }
|
if (preg_match('/\.xla(m)?$/i',$tmpfile)) { $mime='application/vnd.ms-excel'; $imgmime='xls.png'; }
|
||||||
if (preg_match('/\.xsl(b|m|x)?$/i',$tmpfile)) { $mime='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; $imgmime='xls.png'; }
|
if (preg_match('/\.xls$/i',$tmpfile)) { $mime='application/vnd.ms-excel'; $imgmime='xls.png'; }
|
||||||
|
if (preg_match('/\.xls(b|m|x)?$/i',$tmpfile)) { $mime='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; $imgmime='xls.png'; }
|
||||||
if (preg_match('/\.pps(m|x)?$/i',$tmpfile)) { $mime='application/vnd.ms-powerpoint'; $imgmime='ppt.png'; }
|
if (preg_match('/\.pps(m|x)?$/i',$tmpfile)) { $mime='application/vnd.ms-powerpoint'; $imgmime='ppt.png'; }
|
||||||
if (preg_match('/\.ppt(m|x)?$/i',$tmpfile)) { $mime='application/x-mspowerpoint'; $imgmime='ppt.png'; }
|
if (preg_match('/\.ppt(m|x)?$/i',$tmpfile)) { $mime='application/x-mspowerpoint'; $imgmime='ppt.png'; }
|
||||||
// Other
|
// Other
|
||||||
|
|||||||
@ -59,8 +59,8 @@ class ExportExcel2007 extends ExportExcel
|
|||||||
|
|
||||||
$this->id='excel2007'; // Same value then xxx in file name export_xxx.modules.php
|
$this->id='excel2007'; // Same value then xxx in file name export_xxx.modules.php
|
||||||
$this->label='Excel 2007'; // Label of driver
|
$this->label='Excel 2007'; // Label of driver
|
||||||
$this->desc='<b>Excel</b> file format (.xslx)<br>This is native Excel 2007 format (SpreadsheetML).';
|
$this->desc='<b>Excel</b> file format (.xlsx)<br>This is native Excel 2007 format (SpreadsheetML).';
|
||||||
$this->extension='xslx'; // Extension for generated file by this driver
|
$this->extension='xlsx'; // Extension for generated file by this driver
|
||||||
$this->picto='mime/xls'; // Picto
|
$this->picto='mime/xls'; // Picto
|
||||||
$this->version='1.30'; // Driver version
|
$this->version='1.30'; // Driver version
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user