Permalink
Browse files

Code cleanup, closes #416

  • Loading branch information...
1 parent 256ce41 commit 174108df198f6222cd9f957ce8a9952bc20a175a @lorenzo lorenzo committed Mar 3, 2010
Showing with 3 additions and 4 deletions.
  1. +3 −4 cake/libs/i18n.php
View
@@ -461,7 +461,6 @@ function __loadPo($file, $domain) {
* @access private
*/
function __loadLocaleDefinition($file, $domain = null) {
- $_this =& I18N::getInstance();
$comment = '#';
$escape = '\\';
$currentToken = false;
@@ -492,15 +491,15 @@ function __loadLocaleDefinition($file, $domain = null) {
$len = strlen($value) - 1;
if ($value[$len] === $escape) {
- $value = substr($value,0,$len);
+ $value = substr($value, 0, $len);
continue;
}
$mustEscape = array($escape . ',' , $escape . ';', $escape . '<', $escape . '>', $escape . $escape);
$replacements = array_map('crc32', $mustEscape);
$value = str_replace($mustEscape, $replacements, $value);
$value = explode(';', $value);
- $_this->__escape = $escape;
+ $this->__escape = $escape;
foreach ($value as $i => $val) {
$val = trim($val, '"');
$val = preg_replace_callback('/(?:<)?(.[^>]*)(?:>)?/', array(&$this, '__parseLiteralValue'), $val);
@@ -540,7 +539,7 @@ function __parseLiteralValue($string) {
$delimiter = 'U00';
return join('', array_map('chr', array_map('hexdec', array_filter(explode($delimiter, $string)))));
}
- if (preg_match('/U([0-9a-fA-F]{4})/',$string,$match)){
+ if (preg_match('/U([0-9a-fA-F]{4})/', $string, $match)) {
return Multibyte::ascii(array(hexdec($match[1])));
}
return $string;

0 comments on commit 174108d

Please sign in to comment.