forked from extern/egroupware
removed ereg_replace which causes problems with multibyte charsets and mbstring.function_overload=7
This commit is contained in:
parent
12fcf092c7
commit
bb29a8e4d0
@ -413,20 +413,19 @@
|
|||||||
$lines = file($appfile);
|
$lines = file($appfile);
|
||||||
foreach($lines as $line)
|
foreach($lines as $line)
|
||||||
{
|
{
|
||||||
$line = eregi_replace("\t+", "\t", $line);
|
// explode with "\t" and removing "\n" with str_replace, needed to work with mbstring.overload=7
|
||||||
$_f_buffer = split("\t", $line);
|
list($message_id,$app_name,,$content) = $_f_buffer = explode("\t",$line);
|
||||||
|
$content=str_replace(array("\n","\r"),'',$content);
|
||||||
|
|
||||||
# Bad Line
|
|
||||||
if( count($_f_buffer) != 4 )
|
if( count($_f_buffer) != 4 )
|
||||||
{
|
{
|
||||||
$line_display = eregi_replace("\t", "<font color='red'><b>\\t</b></font>", $line);
|
$line_display = str_replace(array("\t","\n"),
|
||||||
$line_display = eregi_replace("\n", "<font color='red'><b>\\n</b></font>", $line_display);
|
array("<font color='red'><b>\\t</b></font>","<font color='red'><b>\\n</b></font>"), $line);
|
||||||
$this->line_rejected[] = Array("appfile" => $appfile, "line" => $line_display);
|
$this->line_rejected[] = array(
|
||||||
|
'appfile' => $appfile,
|
||||||
|
'line' => $line_display,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// explode with "\t" and removing "\n" with str_replace, needed to work with mbstring.overload=7
|
|
||||||
list($message_id,$app_name,,$content) = explode("\t",$line);
|
|
||||||
$content=str_replace(array("\n","\r"),'',$content);
|
|
||||||
$message_id = substr(strtolower(chop($message_id)),0,MAX_MESSAGE_ID_LENGTH);
|
$message_id = substr(strtolower(chop($message_id)),0,MAX_MESSAGE_ID_LENGTH);
|
||||||
$app_name = chop($app_name);
|
$app_name = chop($app_name);
|
||||||
$raw[$app_name][$message_id] = $content;
|
$raw[$app_name][$message_id] = $content;
|
||||||
|
Loading…
Reference in New Issue
Block a user