X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=class%2Fmime%2FContentType.class.php;h=073b6d6cf321ce6da740395b43adcf0efe4c4367;hb=353d074afac6827c90f4bb03e846c5e453d3b5b1;hp=e498c173e3c01df9f1dcc41507a2921bb7fa946c;hpb=79ba18dc89b1b096ecdf0b77169d57e0caf661db;p=squirrelmail.git diff --git a/class/mime/ContentType.class.php b/class/mime/ContentType.class.php index e498c173..073b6d6c 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-2013 The SquirrelMail Project Team + * @copyright 2003-2018 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); + } }