2007-10-26 13:16
Hotfix a problémára:
ips_kernel/class_ajax.php
Keresd meg:
[codebox] /*-------------------------------------------------------------------------*/
// Convert Ajax unicode
/*-------------------------------------------------------------------------*/
function convert_unicode($t)
{
/*if ( strtolower($this->ipsclass->vars['gb_char_set']) == 'utf-8' )
{
return preg_replace_callback( '#%u([0-9A-F]{1,4})#i', array( &$this, 'dec_char_ref_to_utf8_hexdec' ), utf8_encode($t) );
}
else
{
return preg_replace_callback( '#%u([0-9A-F]{1,4})#i', create_function( '$matches', "return '&#' . hexdec(\$matches[1]) . ';';" ), $t );
}*/
// Javascript escape function always sends unicode
$text = preg_replace_callback( '#%u([0-9A-F]{1,4})#i', array( &$this, 'dec_char_ref_to_utf8_hexdec' ), utf8_encode($t) );
if ( strtolower($this->ipsclass->vars['gb_char_set']) != 'utf-8' )
{
$text = $this->ipsclass->txt_convert_charsets( $text, 'UTF-8' );
}
return $text ? $text : $t;
}
/**
* Convert HTML entities and respect character sets
*/[/codebox]
Helyettesítsd ezzel:
[codebox] /*-------------------------------------------------------------------------*/
// Convert Ajax unicode
/*-------------------------------------------------------------------------*/
function convert_unicode($t)
{
if ( strtolower($this->ipsclass->vars['gb_char_set']) == 'utf-8' )
{
return preg_replace_callback( '#%u([0-9A-F]{1,4})#i', array( &$this, 'dec_char_ref_to_utf8_hexdec' ), utf8_encode($t) );
}
else
{
return preg_replace_callback( '#%u([0-9A-F]{1,4})#i', create_function( '$matches', "return '&#' . hexdec(\$matches[1]) . ';';" ), $t );
}
// Javascript escape function always sends unicode
/*$text = preg_replace_callback( '#%u([0-9A-F]{1,4})#i', array( &$this, 'dec_char_ref_to_utf8_hexdec' ), utf8_encode($t) );
if ( strtolower($this->ipsclass->vars['gb_char_set']) != 'utf-8' )
{
$text = $this->ipsclass->txt_convert_charsets( $text, 'UTF-8' );
}
return $text ? $text : $t;*/
}
/**
* Convert HTML entities and respect character sets
*/[/codebox]
Spoiler!
ips_kernel/class_ajax.php
Keresd meg:
[codebox] /*-------------------------------------------------------------------------*/
// Convert Ajax unicode
/*-------------------------------------------------------------------------*/
function convert_unicode($t)
{
/*if ( strtolower($this->ipsclass->vars['gb_char_set']) == 'utf-8' )
{
return preg_replace_callback( '#%u([0-9A-F]{1,4})#i', array( &$this, 'dec_char_ref_to_utf8_hexdec' ), utf8_encode($t) );
}
else
{
return preg_replace_callback( '#%u([0-9A-F]{1,4})#i', create_function( '$matches', "return '&#' . hexdec(\$matches[1]) . ';';" ), $t );
}*/
// Javascript escape function always sends unicode
$text = preg_replace_callback( '#%u([0-9A-F]{1,4})#i', array( &$this, 'dec_char_ref_to_utf8_hexdec' ), utf8_encode($t) );
if ( strtolower($this->ipsclass->vars['gb_char_set']) != 'utf-8' )
{
$text = $this->ipsclass->txt_convert_charsets( $text, 'UTF-8' );
}
return $text ? $text : $t;
}
/**
* Convert HTML entities and respect character sets
*/[/codebox]
Helyettesítsd ezzel:
[codebox] /*-------------------------------------------------------------------------*/
// Convert Ajax unicode
/*-------------------------------------------------------------------------*/
function convert_unicode($t)
{
if ( strtolower($this->ipsclass->vars['gb_char_set']) == 'utf-8' )
{
return preg_replace_callback( '#%u([0-9A-F]{1,4})#i', array( &$this, 'dec_char_ref_to_utf8_hexdec' ), utf8_encode($t) );
}
else
{
return preg_replace_callback( '#%u([0-9A-F]{1,4})#i', create_function( '$matches', "return '&#' . hexdec(\$matches[1]) . ';';" ), $t );
}
// Javascript escape function always sends unicode
/*$text = preg_replace_callback( '#%u([0-9A-F]{1,4})#i', array( &$this, 'dec_char_ref_to_utf8_hexdec' ), utf8_encode($t) );
if ( strtolower($this->ipsclass->vars['gb_char_set']) != 'utf-8' )
{
$text = $this->ipsclass->txt_convert_charsets( $text, 'UTF-8' );
}
return $text ? $text : $t;*/
}
/**
* Convert HTML entities and respect character sets
*/[/codebox]
