In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
742 [In-Portal CMS] Data Management feature request N/A 2010-05-23 07:08 2012-07-25 05:33
alex  
alex  
normal  
closed 5.0.3  
fixed  
 
none 5.2.0-B1  
http://groups.google.com/group/in-portal-bugs/browse_thread/thread/e1fc0cb67da6c044 https://groups.google.com/d/topic/in-portal-bugs/frB3pnJ6-jI/discussion
1
0000742: Create universal file mime type detection function
For now we are using "mime_content_type" function, that is no longer available in PHP5. There is also "finfo_file" function, that is quite modern and gives better result, then "mime_content_type" does. Unfortunately on PHP4 it's only available as PECL extension and not installed by default. In PHP5 it is compiled by default.

We also have some code in kEmailSendingHelper class, that allows to detect mime type, based only on file extension.

I propose we combine all described above into one single function and use it later (function available in "universal_mime_detection.patch" file).
Mime types for any OpenOffice documents not used (needs to be added to the new "mime_content_type" function:

'application/vnd.sun.xml.writer',
'application/vnd.sun.xml.calc',
'application/vnd.sun.xml.impress',
'application/vnd.sun.xml.draw',
'application/vnd.sun.xml.math',
'application/vnd.oasis.opendocument.text',
'application/vnd.oasis.opendocument.text-web',
'application/vnd.oasis.opendocument.text-master',
'application/vnd.oasis.opendocument.graphics',
'application/vnd.oasis.opendocument.presentation',
'application/vnd.oasis.opendocument.spreadsheet',
'application/vnd.oasis.opendocument.chart',
'application/vnd.oasis.opendocument.formula',
'application/vnd.oasis.opendocument.database',
'application/vnd.oasis.opendocument.image',



We need to use proposed function where applicable and create a new patch for testing.
patch universal_mime_detection.patch (2,055) 2010-05-23 07:08
http://tracker.in-portal.org/file_download.php?file_id=581&type=bug
patch universal_mime_detection_core_520.patch (8,093) 2011-10-04 03:38
http://tracker.in-portal.org/file_download.php?file_id=1189&type=bug
patch universal_mime_detection_modules_520.patch (2,335) 2011-10-04 03:38
http://tracker.in-portal.org/file_download.php?file_id=1190&type=bug
Issue History
2012-07-25 05:33 alex Note Added: 0005097
2012-07-25 05:33 alex Status resolved => closed
2011-10-22 05:33 alex Estimate Points => 1
2011-10-04 03:39 alex Changeset attached 5.2.x r14619
2011-10-04 03:39 alex Note Added: 0003987
2011-10-04 03:39 alex Status reviewed and tested => resolved
2011-10-04 03:39 alex Fixed in Version => 5.2.0-B1
2011-10-04 03:39 alex Resolution open => fixed
2011-10-04 03:39 alex Assigned To !COMMUNITY => alex
2011-10-04 03:38 alex Changeset attached 5.2.x r14618
2011-10-04 03:38 alex Note Added: 0003986
2011-10-04 03:38 alex Status needs testing => reviewed and tested
2011-10-04 03:38 alex Time Estimate Removed 1 =>
2011-10-04 03:38 alex Assigned To => !COMMUNITY
2011-10-04 03:38 alex Developer => alex
2011-10-04 03:38 alex Status active => needs testing
2011-10-04 03:38 alex File Added: universal_mime_detection_modules_520.patch
2011-10-04 03:38 alex File Added: universal_mime_detection_core_520.patch
2011-09-26 04:49 alex Time Estimate Added 1
2011-09-26 04:49 alex Issue Monitored: Dmitry
2011-09-26 04:49 alex Note Added: 0003911
2011-09-26 04:49 alex Additional Information Updated bug_revision_view_page.php?rev_id=846#r846
2011-09-23 21:15 Dmitry Target Version Icebox => 5.2.0
2011-01-28 09:35 Dmitry Reference http://groups.google.com/group/in-portal-bugs/browse_thread/thread/e1fc0cb67da6c044 => http://groups.google.com/group/in-portal-bugs/browse_thread/thread/e1fc0cb67da6c044 https://groups.google.com/d/topic/in-portal-bugs/frB3pnJ6-jI/discussion
2011-01-28 09:35 Dmitry Additional Information Updated bug_revision_view_page.php?rev_id=670#r670
2010-05-23 07:09 alex Reference => http://groups.google.com/group/in-portal-bugs/browse_thread/thread/e1fc0cb67da6c044
2010-05-23 07:08 alex New Issue
2010-05-23 07:08 alex File Added: universal_mime_detection.patch

Notes
(0003911)
alex   
2011-09-26 04:49   
Reminder sent to: Dmitry

Could you please also provide file extensions for provided mime types of OpenOffice documents.
(0003986)
alex   
2011-10-04 03:38   
Will test all together.
(0003987)
alex   
2011-10-04 03:39   
Fix committed to 5.2.x branch. Commit Message:

Fixes 0000742: Create universal file mime type detection function
(0005097)
alex   
2012-07-25 05:33   
Since 5.2.0 version was released.