Now allow multiple plugins to handle (add links for) a single attachment MIME type
[squirrelmail.git] / functions / attachment_common.php
index f14b17c4c3555cc4c3f1bf3207830fef89ddea4b..ab339b72bce115e041c6795f94d9646b9e2ee5b4 100644 (file)
@@ -5,7 +5,7 @@
  *
  * This file provides the handling of often-used attachment types.
  *
- * @copyright 1999-2009 The SquirrelMail Project Team
+ * @copyright 1999-2010 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -269,11 +269,10 @@ function attachment_common_octet_stream(&$Args) {
 
     $Ext = '';
     if (is_array($Regs) && isset($Regs[1])) {
-       $Ext = $Regs[1];
+        $Ext = $Regs[1];
+        $Ext = strtolower($Regs[1]);
     }
 
-    $Ext = strtolower($Regs[1]);
-
     if ($Ext == '' || ! isset($FileExtensionToMimeType[$Ext]))
         return;