X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=class%2Fmime%2FContentType.class.php;h=86433aa37ba133ac31a3e4d1b16d036c46da37d5;hp=8c0a5647c183465dcb5d7fcc6cd8a902d7d52d2e;hb=0fd4ea6d9d94c61c08a4e033f013024e6660c591;hpb=1977ab5587905d225c6288141b82f7a6e3d29d02;ds=sidebyside diff --git a/class/mime/ContentType.class.php b/class/mime/ContentType.class.php index 8c0a5647..86433aa3 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-2010 The SquirrelMail Project Team + * @copyright 2003-2016 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($name); + } }