From: pdontthink Date: Sat, 10 Dec 2016 10:29:47 +0000 (+0000) Subject: Add PHP5-style constructor X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0fd4ea6d9d94c61c08a4e033f013024e6660c591;p=squirrelmail.git Add PHP5-style constructor git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14618 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/class/mime/ContentType.class.php b/class/mime/ContentType.class.php index 1919c082..86433aa3 100644 --- a/class/mime/ContentType.class.php +++ b/class/mime/ContentType.class.php @@ -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($name); + } }