From cdd461f2c0364447543fce11d4e6fd58a8bcc220 Mon Sep 17 00:00:00 2001 From: vargenau Date: Tue, 9 Jun 2009 08:30:38 +0000 Subject: [PATCH] Do not display dots if string is at beginning git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@6907 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/PageList.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PageList.php b/lib/PageList.php index 7e48be386..5a1afc1d0 100644 --- a/lib/PageList.php +++ b/lib/PageList.php @@ -422,7 +422,7 @@ class _PageList_Column_content extends _PageList_Column { $j = max(0, $i - ($this->bytes / 2)); return HTML::div(array('style' => 'font-size:x-small'), HTML::div(array('class' => 'transclusion'), - HTML::span("...".substr($c, $j, ($this->bytes / 2))), + HTML::span(($j ? '...' : '').substr($c, $j, ($j ? $this->bytes / 2 : $i))), HTML::span(array("style"=>"background:yellow"),substr($c, $i, $l)), HTML::span(substr($c, $i+$l, ($this->bytes / 2))."..."." ".($score ? sprintf("[%0.1f]",$score):"")))); } else { -- 2.45.0