X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fattachment_common.php;h=3b9e561a923b7de4fa8baeb079293b0b14a8367a;hb=318578ca2325e714600a7035829c3cc22473463b;hp=71709788ea96818deef7fce714ed1e6b1de53e56;hpb=4691e7887753196b49dd879dd9231c26f22bddfb;p=squirrelmail.git diff --git a/functions/attachment_common.php b/functions/attachment_common.php index 71709788..3b9e561a 100644 --- a/functions/attachment_common.php +++ b/functions/attachment_common.php @@ -3,11 +3,10 @@ /** * attachment_common.php * - * Copyright (c) 1999-2005 The SquirrelMail Project Team - * Licensed under the GNU GPL. For full terms see the file COPYING. - * * This file provides the handling of often-used attachment types. * + * @copyright © 1999-2006 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail * @todo document attachment $type hook arguments @@ -37,6 +36,7 @@ $FileExtensionToMimeType = array('bmp' => 'image/x-bitmap', 'gif' => 'image/gif', 'htm' => 'text/html', 'html' => 'text/html', + 'jpe' => 'image/jpeg', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'php' => 'text/plain', @@ -57,12 +57,12 @@ if (isset($attachment_common_types)) { foreach ($attachment_common_types as $val => $v) { if ($val == 'image/gif') register_attachment_common('image/gif', 'link_image'); - elseif (($val == 'image/jpeg' || $val == 'image/pjpeg') and + elseif (($val == 'image/jpeg' || $val == 'image/pjpeg' || $val == 'image/jpg') and (!isset($jpeg_done))) { $jpeg_done = 1; + register_attachment_common('image/jpg', 'link_image'); register_attachment_common('image/jpeg', 'link_image'); register_attachment_common('image/pjpeg', 'link_image'); - // register_attachment_common('image/jpg', 'link_image'); } elseif ($val == 'image/png') register_attachment_common('image/png', 'link_image'); @@ -75,9 +75,9 @@ if (isset($attachment_common_types)) { */ if (! isset($jpeg_done)) { $jpeg_done = 1; + register_attachment_common('image/jpg', 'link_image'); register_attachment_common('image/jpeg', 'link_image'); register_attachment_common('image/pjpeg', 'link_image'); - // register_attachment_common('image/jpg', 'link_image'); } register_attachment_common('image/gif', 'link_image'); register_attachment_common('image/png', 'link_image');