Changeset 5769 in subversion
- Timestamp:
- Jan 13, 2012 6:21:45 AM (17 months ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 3 edited
-
CHANGELOG (modified) (1 diff)
-
program/include/main.inc (modified) (1 diff)
-
program/include/rcube_shared.inc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r5755 r5769 2 2 =========================== 3 3 4 - Make mime type detection based on filename extension to be case-insensitive 4 5 - Fix failure on MySQL database upgrade from 0.7 - text column can't have default value (#1488300) 5 6 - Added address book widget on compose screen -
trunk/roundcubemail/program/include/main.inc
r5733 r5769 1628 1628 1629 1629 $classes = array($primary ? $primary : 'unknown'); 1630 if ($secondary) 1630 if ($secondary) { 1631 1631 $classes[] = $secondary; 1632 if (preg_match('/\.([a-z0-9]+)$/', $filename, $m)) 1632 } 1633 if (preg_match('/\.([a-z0-9]+)$/i', $filename, $m)) { 1633 1634 $classes[] = $m[1]; 1634 1635 return join(" ", $classes); 1635 } 1636 1637 return strtolower(join(" ", $classes)); 1636 1638 } 1637 1639 -
trunk/roundcubemail/program/include/rcube_shared.inc
r5713 r5769 363 363 $mime_magic = rcmail::get_instance()->config->get('mime_magic'); 364 364 $mime_ext = @include(RCMAIL_CONFIG_DIR . '/mimetypes.php'); 365 $suffix = $name ? substr($name, strrpos($name, '.')+1) : '*';366 365 367 366 // use file name suffix with hard-coded mime-type map 368 if (is_array($mime_ext)) { 369 $mime_type = $mime_ext[$suffix]; 370 } 367 if (is_array($mime_ext) && $name) { 368 if ($suffix = substr($name, strrpos($name, '.')+1)) { 369 $mime_type = $mime_ext[strtolower($suffix)]; 370 } 371 } 372 371 373 // try fileinfo extension if available 372 374 if (!$mime_type && function_exists('finfo_open')) { … … 379 381 } 380 382 } 383 381 384 // try PHP's mime_content_type 382 385 if (!$mime_type && !$is_stream && function_exists('mime_content_type')) { 383 386 $mime_type = @mime_content_type($path); 384 387 } 388 385 389 // fall back to user-submitted string 386 390 if (!$mime_type) {
Note: See TracChangeset
for help on using the changeset viewer.
