cvs: pear /I18Nv2 Encoding.php

From: Date: Sat, 13 Jan 2007 13:37:39 +0000
Subject: cvs: pear /I18Nv2 Encoding.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-44213@lists.php.net to get a copy of this message
mike Sat Jan 13 13:37:39 2007 UTC Modified files: /pear/I18Nv2 Encoding.php Log: - fix Bug #7884 Typo in Encoding.php - improve ::forAlias() http://cvs.php.net/viewvc.cgi/pear/I18Nv2/Encoding.php?r1=1.1&r2=1.2&diff_format=u Index: pear/I18Nv2/Encoding.php diff -u pear/I18Nv2/Encoding.php:1.1 pear/I18Nv2/Encoding.php:1.2 --- pear/I18Nv2/Encoding.php:1.1 Mon Dec 6 15:12:56 2004 +++ pear/I18Nv2/Encoding.php Sat Jan 13 13:37:39 2007 @@ -11,7 +11,7 @@ // | Copyright (c) 2004 Michael Wallner <mike@iworks.at> | // +----------------------------------------------------------------------+ // -// $Id: Encoding.php,v 1.1 2004/12/06 15:12:56 mike Exp $ +// $Id: Encoding.php,v 1.2 2007/01/13 13:37:39 mike Exp $ /** * I18Nv2::Encoding @@ -26,7 +26,7 @@ * List of common and not so common character sets and their aliases. * * @author Michael Wallner <mike@php.net> - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ * @package I18Nv2 * @access public * @static @@ -56,7 +56,7 @@ */ function isEncoding($encoding) { - $name = I18Nv3_Encoding::standardize($encoding); + $name = I18Nv2_Encoding::standardize($encoding); return isset($GLOBALS['_I18Nv2_Encoding_Names'][$name]); } @@ -133,9 +133,9 @@ function forAlias($alias) { $name = I18Nv2_Encoding::standardize($alias); - foreach (array_keys($GLOBALS['_I18Nv2_Encoding_Aliases']) as $a) { - if (in_array($name, $GLOBALS['_I18Nv2_Encoding_Aliases'][$a])) { - return $GLOBALS['_I18Nv2_Encoding_Names'][$a]; + foreach ($GLOBALS['_I18Nv2_Encoding_Aliases'] as $k => $a) { + if (in_array($name, $a)) { + return $GLOBALS['_I18Nv2_Encoding_Names'][$k]; } } return false;

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