X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=class%2Fmime%2FContentType.class.php;h=ad83d202a4f81729f10e50557cd67ce828cec6da;hp=d3c125a304c4a0df388047e60802dd63d2089ea0;hb=c4faef335b2362c81b8ebf026d4066c12d70536c;hpb=701e7beed3baca980039f978c6d536dd91cae775 diff --git a/class/mime/ContentType.class.php b/class/mime/ContentType.class.php index d3c125a3..ad83d202 100644 --- a/class/mime/ContentType.class.php +++ b/class/mime/ContentType.class.php @@ -6,7 +6,7 @@ * This file contains functions needed to handle content type headers * (rfc2045) in mime messages. * - * @copyright 2003-2014 The SquirrelMail Project Team + * @copyright 2003-2020 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -41,11 +41,11 @@ class ContentType { var $properties = ''; /** - * Constructor function. + * Constructor (PHP5 style, required in some future version of PHP) * Prepared type0 and type1 properties * @param string $type content type string without auxiliary information */ - function ContentType($type) { + function __construct($type) { $type = strtolower($type); $pos = strpos($type, '/'); if ($pos > 0) { @@ -56,4 +56,13 @@ class ContentType { } $this->properties = array(); } + + /** + * Constructor (PHP4 style, kept for compatibility reasons) + * Prepared type0 and type1 properties + * @param string $type content type string without auxiliary information + */ + function ContentType($type) { + self::__construct($type); + } }