"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "framework/validators/CEmailValidator.php" between
yii-1.1.21.733ac5.tar.gz and yii-1.1.22.bf1d26.tar.gz

About: Yii is a high-performance component-based PHP framework for developing large-scale Web applications. Hint: Yii 1.1 is now in maintenance mode.

CEmailValidator.php  (yii-1.1.21.733ac5):CEmailValidator.php  (yii-1.1.22.bf1d26)
skipping to change at line 203 skipping to change at line 203
* Converts given IDN to the punycode. * Converts given IDN to the punycode.
* @param string $value IDN to be converted. * @param string $value IDN to be converted.
* @return string resulting punycode. * @return string resulting punycode.
* @since 1.1.13 * @since 1.1.13
*/ */
private function encodeIDN($value) private function encodeIDN($value)
{ {
if(preg_match_all('/^(.*)@(.*)$/',$value,$matches)) if(preg_match_all('/^(.*)@(.*)$/',$value,$matches))
{ {
if(function_exists('idn_to_ascii')) if(function_exists('idn_to_ascii'))
$value=$matches[1][0].'@'.idn_to_ascii($matches[2 {
][0]); $value=$matches[1][0].'@';
if (defined('IDNA_NONTRANSITIONAL_TO_ASCII') && d
efined('INTL_IDNA_VARIANT_UTS46'))
{
$value.=idn_to_ascii($matches[2][0],IDNA_
NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
}
else
{
$value.=idn_to_ascii($matches[2][0]);
}
}
else else
{ {
require_once(Yii::getPathOfAlias('system.vendors. Net_IDNA2.Net').DIRECTORY_SEPARATOR.'IDNA2.php'); require_once(Yii::getPathOfAlias('system.vendors. Net_IDNA2.Net').DIRECTORY_SEPARATOR.'IDNA2.php');
$idna=new Net_IDNA2(); $idna=new Net_IDNA2();
$value=$matches[1][0].'@'.@$idna->encode($matches [2][0]); $value=$matches[1][0].'@'.@$idna->encode($matches [2][0]);
} }
} }
return $value; return $value;
} }
} }
 End of changes. 1 change blocks. 
2 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)