X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=class%2Fmime%2FContentType.class.php;h=1287bb3a7b9183b09f12ad444010decab234c693;hp=2c5ff8f0a50fb80e58d5557c8bcf5ac9e979a5d8;hb=69e110f3320c698f8ecc5a7f34ea9fac1caf3c39;hpb=6f6ed9a7dad95211b4dae43cfc610c7004fd3050 diff --git a/class/mime/ContentType.class.php b/class/mime/ContentType.class.php index 2c5ff8f0..1287bb3a 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-2007 The SquirrelMail Project Team + * @copyright 2003-2017 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); + } }