fsf changes, meant to be rebased on upstream
[squirrelmail.git] / class / mime / Disposition.class.php
index bf005697774030758e09ab55c439dba3dc3986f6..788ca0541b3cbaaa6a83f4bd600fd1ce59dc5011 100644 (file)
@@ -3,17 +3,15 @@
 /**
  * Disposition.class.php
  *
- * Copyright (c) 2003-2005 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
  * This file contains functions needed to handle content disposition headers 
- * in mime messages.
+ * in mime messages. See RFC 2183.
  *
+ * @copyright 2003-2021 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
  * @subpackage mime
  * @since 1.3.2
- * @todo find rfc number
  */
 
 /**
  */
 class Disposition {
     /**
-     * Constructor function
+     * Constructor (PHP5 style, required in some future version of PHP)
      * @param string $name
      */
-    function Disposition($name) {
+    function __construct($name) {
        $this->name = $name;
        $this->properties = array();
     }
 
+    /**
+     * Constructor (PHP4 style, kept for compatibility reasons)
+     * @param string $name
+     */
+    function Disposition($name) {
+       self::__construct($name);
+    }
+
     /**
      * Returns value of content disposition property
      * @param string $par content disposition property name
@@ -40,12 +46,10 @@ class Disposition {
      * @since 1.3.1
      */
     function getProperty($par) {
-        $value = strtolower($par);
+        $par = strtolower($par);
         if (isset($this->properties[$par])) {
             return $this->properties[$par];
         }
         return '';
     }
 }
-
-?>
\ No newline at end of file