[geeklog-cvs] geeklog: Fixed display of text excerpt for search results on PHP...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Thu Oct 29 15:01:06 EDT 2009


changeset 7401:65103610c52f
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/65103610c52f
user: Dirk Haun <dirk at haun-online.de>
date: Thu Oct 29 19:50:58 2009 +0100
description:
Fixed display of text excerpt for search results on PHP 4, caused by differences in the handling of references between PHP 4 and 5 (bug #0001004)

diffstat:

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

diffs (32 lines):

diff -r 37fcd14cdee2 -r 65103610c52f public_html/docs/history
--- a/public_html/docs/history	Thu Oct 29 18:09:46 2009 +0100
+++ b/public_html/docs/history	Thu Oct 29 19:50:58 2009 +0100
@@ -3,6 +3,8 @@
 Oct ??, 2009 (1.6.1)
 ------------
 
+- Fixed display of text excerpt for search results on PHP 4 (bug #0001004)
+  [Dirk]
 - The comment speed limit was being ignored (bug #0001003) [Dirk]
 - Added an icon to make the plugin update option somewhat more obvious [Dirk]
   (icon "stock_update-data.png" taken from Gnome 2.18 icon theme set by
diff -r 37fcd14cdee2 -r 65103610c52f system/classes/search.class.php
--- a/system/classes/search.class.php	Thu Oct 29 18:09:46 2009 +0100
+++ b/system/classes/search.class.php	Thu Oct 29 19:50:58 2009 +0100
@@ -457,7 +457,6 @@
 
         $url = "{$this->_searchURL}&type={$this->_type}&mode=";
         $obj = new ListFactory($url.'search', $_CONF['search_limits'], $_CONF['num_search_results']);
-        $obj->setRowFunction(array($this, 'searchFormatCallback'));
         $obj->setField('ID', 'id', false);
         $obj->setField('URL', 'url', false);
 
@@ -495,6 +494,8 @@
             $this->_wordlength = 50;
         }
         $obj->setDefaultSort('hits');
+        // set this only now, for compatibility with PHP 4
+        $obj->setRowFunction(array($this, 'searchFormatCallback'));
 
         // Start search timer
         $searchtimer = new timerobject();



More information about the geeklog-cvs mailing list