| | |
| | | try { |
| | | // convert to the right timezone |
| | | $stz = date_default_timezone_get(); |
| | | $tz = new DateTimeZone($convert ? $RCMAIL->config->get('timezones') : 'GMT'); |
| | | $tz = new DateTimeZone($convert ? $RCMAIL->config->get('timezone') : 'GMT'); |
| | | $date->setTimezone($tz); |
| | | date_default_timezone_set($tz->getName()); |
| | | |
| | |
| | | list($primary, $secondary) = explode('/', $mimetype); |
| | | |
| | | $classes = array($primary ? $primary : 'unknown'); |
| | | if ($secondary) |
| | | if ($secondary) { |
| | | $classes[] = $secondary; |
| | | if (preg_match('/\.([a-z0-9]+)$/', $filename, $m)) |
| | | } |
| | | if (preg_match('/\.([a-z0-9]+)$/i', $filename, $m)) { |
| | | $classes[] = $m[1]; |
| | | } |
| | | |
| | | return join(" ", $classes); |
| | | return strtolower(join(" ", $classes)); |
| | | } |
| | | |
| | | /** |