* infolog: when breaking overlong words into fitting pieces, do not break lines that are tested positive to contain links. (reported as Helpdesk issue #1324 in Stylite tracker)

This commit is contained in:
Klaus Leithoff 2011-03-21 16:12:55 +00:00
parent 67575e1cd1
commit 1f66093694

View File

@ -1352,9 +1352,13 @@ class infolog_ui
// set blank behind all , and . if words are too long, apply wordwrap afterwards to make sure we get // set blank behind all , and . if words are too long, apply wordwrap afterwards to make sure we get
if (strlen($word)>75) if (strlen($word)>75)
{ {
if (!(strpos($word,',')===false) && strpos($word,', ')===false) $word = str_replace(',',', ',$word); $buff = html::activate_links($word);
if (!(strpos($word,'.')===false) && strpos($word,'. ')===false) $word = str_replace('.','. ',$word); if (strlen($buff) == strlen($word)) // no links -> try to break overlong words
$word = wordwrap($word, 75, ' ', true); {
if (!(strpos($word,',')===false) && strpos($word,', ')===false) $word = str_replace(',',', ',$word);
if (!(strpos($word,'.')===false) && strpos($word,'. ')===false) $word = str_replace('.','. ',$word);
$word = wordwrap($word, 75, ' ', true);
}
} }
$ckarray[] =$word; $ckarray[] =$word;
} }