cvs: pear /MIME_Type Type.php

From: Date: Sun, 25 Mar 2007 08:21:49 +0000
Subject: cvs: pear /MIME_Type Type.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-45424@lists.php.net to get a copy of this message
cweiske Sun Mar 25 08:21:49 2007 UTC Modified files: /pear/MIME_Type Type.php Log: Fixing bug: experimental type with uppercase X not detected http://cvs.php.net/viewvc.cgi/pear/MIME_Type/Type.php?r1=1.4&r2=1.5&diff_format=u Index: pear/MIME_Type/Type.php diff -u pear/MIME_Type/Type.php:1.4 pear/MIME_Type/Type.php:1.5 --- pear/MIME_Type/Type.php:1.4 Sun Mar 25 06:40:22 2007 +++ pear/MIME_Type/Type.php Sun Mar 25 08:21:49 2007 @@ -16,7 +16,7 @@ // | Authors: Ian Eure <ieure@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Type.php,v 1.4 2007/03/25 06:40:22 cweiske Exp $ +// $Id: Type.php,v 1.5 2007/03/25 08:21:49 cweiske Exp $ require_once 'PEAR.php'; @@ -195,10 +195,10 @@ */ function get() { - $type = strtolower($this->media.'/'.$this->subType); + $type = strtolower($this->media . '/' . $this->subType); if (count($this->parameters)) { foreach ($this->parameters as $key => $null) { - $type .= '; '.$this->parameters[$key]->get(); + $type .= '; ' . $this->parameters[$key]->get(); } } return $type; @@ -217,7 +217,7 @@ function isExperimental($type) { if (substr(MIME_Type::getMedia($type), 0, 2) == 'x-' || - substr(MIME_Type::getSubType($type), 0, 2) == 'x-') { + substr(MIME_Type::getSubType($type), 0, 2) == 'X-') { return true; } return false; @@ -296,7 +296,7 @@ */ function addParameter($name, $value, $comment = false) { - $tmp = &new MIME_Type_Parameter; + $tmp = &new MIME_Type_Parameter(); $tmp->name = $name; $tmp->value = $value; $tmp->comment = $comment;

« previous php.pear.cvs (#45424) next »