[geeklog-cvs] geeklog: Hmm, this is awkward ...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Thu May 21 11:25:14 EDT 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/cbc696117485
changeset: 7044:cbc696117485
user:      Dirk Haun <dirk at haun-online.de>
date:      Thu May 21 17:10:50 2009 +0200
description:
Hmm, this is awkward ...

diffstat:

 system/classes/search.class.php |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r db76294ecddf -r cbc696117485 system/classes/search.class.php
--- a/system/classes/search.class.php	Thu May 21 17:02:23 2009 +0200
+++ b/system/classes/search.class.php	Thu May 21 17:10:50 2009 +0200
@@ -746,7 +746,7 @@
             $row['title'] = stripslashes(str_replace('$', '$', $row['title']));
             $row['title'] = COM_createLink($row['title'], $row['url']);
 
-            if ($row['description'] != $LANG09[70]) {
+            if ($row['description'] != '<i>' . $LANG09[70] . '</i>') {
                 $row['description'] = stripslashes($this->_shortenText($this->_query, $row['description'], $this->_wordlength));
             }
 
@@ -804,8 +804,9 @@
                 if ($key <= $m)
                 {
                     // Keyword at the start of text
-                    $start = 0;
+                    $start = 0 - $key;
                     $end = $num_words - 1;
+                    $end = (($key + $m <= $word_count - 1) ? $key : $word_count - $m - 1);
                 }
                 else
                 {



More information about the geeklog-cvs mailing list