forked from extern/egroupware
"fixed bug reported on the userlist: partial content under mbstring.func_overload&2"
This commit is contained in:
parent
cf7af58f88
commit
5f228355ef
@ -92,10 +92,11 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$payload = "<?xml version=\"1.0\"?>\n" . $this->serializeDebug() . $r->serialize();
|
||||
$payload = $GLOBALS['egw']->translation->convert("<?xml version=\"1.0\"?>\n" . $this->serializeDebug() . $r->serialize(),
|
||||
$GLOBALS['egw']->translation->charset(),'utf-8');
|
||||
header("Content-type: text/xml");
|
||||
header("Content-length: " . strlen($payload));
|
||||
echo $GLOBALS['egw']->translation->convert($payload,$GLOBALS['egw']->translation->charset(),'utf-8');
|
||||
header("Content-length: " . $this->bytes($payload));
|
||||
echo $payload;
|
||||
}
|
||||
|
||||
if ($this->log)
|
||||
@ -119,10 +120,28 @@
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* mbstring.func_overload save strlen version: counting the bytes not the chars
|
||||
*
|
||||
* @param string $str
|
||||
* @return int
|
||||
*/
|
||||
function bytes($str)
|
||||
{
|
||||
static $func_overload;
|
||||
|
||||
if (is_null($func_overload))
|
||||
{
|
||||
$func_overload = @extension_loaded('mbstring') ? ini_get('mbstring.func_overload') : 0;
|
||||
}
|
||||
return $func_overload & 2 ? mb_strlen($str,'ascii') : strlen($str);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
add a method to the dispatch map
|
||||
*/
|
||||
* add a method to the dispatch map
|
||||
*/
|
||||
function add_to_map($methodname,$function,$sig,$doc)
|
||||
{
|
||||
$this->dmap[$methodname] = array(
|
||||
|
Loading…
Reference in New Issue
Block a user