attempt to improve overlong-word-control behavior

This commit is contained in:
Klaus Leithoff 2012-11-07 07:52:59 +00:00
parent 78011ed719
commit b9192c0f4c

View File

@ -1747,7 +1747,16 @@ else
{
continue;
}
$cont = explode(' ', $content[$key]);
$contlines = explode("\n", $content[$key]);
$clarray = array();
foreach ($contlines as &$line)
{
if(strlen($line) < 75)
{
$clarray[] = $line;
continue;
}
$cont = explode(' ', $line);
$ckarray = array();
foreach($cont as &$word)
{
@ -1764,8 +1773,12 @@ else
}
$ckarray[] =$word;
}
$content[$key] = join(' ',$ckarray);
$line = join(' ',$ckarray);
unset($ckarray);
$clarray[] = $line;
}
$content[$key] = join("\n",$clarray);
unset($clarray);
}
if (is_numeric($_REQUEST['cat_id']))
{