Latest changes as cvs freeze
[squirrelmail.git] / functions / attachment_common.php
index 37f06288701cef35ac4a06c1076877c523eb9f39..d89dfe14085417fe8f500a1118d716636bc4f801 100644 (file)
@@ -1,14 +1,34 @@
 <?php
-    /**
-    ** attachment_common.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    ** This file provides the handling of often-used attachment types.
-    **
-    ** $Id$
-    **/
+
+/**
+ * attachment_common.php
+ *
+ * Copyright (c) 1999-2002 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.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the $attachment_common_show_images_list stuff below. ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+global $attachment_common_show_images_list;
+$attachment_common_show_images_list = array();
 
   global $FileExtensionToMimeType, $attachment_common_types;
   $FileExtensionToMimeType = array('bmp'  => 'image/x-bitmap',
@@ -113,9 +133,10 @@ function attachment_common_link_html(&$Args)
      $Args[2] . '&passed_id=' . $Args[3] . '&mailbox=' . $Args[4] .
     '&passed_ent_id=' . $Args[5] . '&override_type0=text&override_type1=html';
   
-  if ($Args[8] && $Args[9])
+  if ($Args[8] && $Args[9]) {
      $Args[1]['attachment_common']['href'] .= '&where=' . 
      urlencode($Args[8]) . '&what=' . urlencode($Args[9]);
+  }
 
   $Args[1]['attachment_common']['text'] = _("view");
   
@@ -137,13 +158,15 @@ function attachment_common_link_image(&$Args)
      $Args[2] . '&passed_id=' . $Args[3] . '&mailbox=' . $Args[4] .
      '&passed_ent_id=' . $Args[5];
   
-  if ($Args[8] && $Args[9])
+  if ($Args[8] && $Args[9]) {
      $Args[1]['attachment_common']['href'] .= '&where=' . 
      urlencode($Args[8]) . '&what=' . urlencode($Args[9]);
+  }
 
   $Args[1]['attachment_common']['text'] = _("view");
   
   $Args[6] = $Args[1]['attachment_common']['href'];
+  
 }