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)
1.1 --- a/public_html/docs/history Thu Oct 29 18:09:46 2009 +0100
1.2 +++ b/public_html/docs/history Thu Oct 29 19:50:58 2009 +0100
1.3 @@ -3,6 +3,8 @@
1.4 Oct ??, 2009 (1.6.1)
1.5 ------------
1.6
1.7 +- Fixed display of text excerpt for search results on PHP 4 (bug #0001004)
1.8 + [Dirk]
1.9 - The comment speed limit was being ignored (bug #0001003) [Dirk]
1.10 - Added an icon to make the plugin update option somewhat more obvious [Dirk]
1.11 (icon "stock_update-data.png" taken from Gnome 2.18 icon theme set by
2.1 --- a/system/classes/search.class.php Thu Oct 29 18:09:46 2009 +0100
2.2 +++ b/system/classes/search.class.php Thu Oct 29 19:50:58 2009 +0100
2.3 @@ -457,7 +457,6 @@
2.4
2.5 $url = "{$this->_searchURL}&type={$this->_type}&mode=";
2.6 $obj = new ListFactory($url.'search', $_CONF['search_limits'], $_CONF['num_search_results']);
2.7 - $obj->setRowFunction(array($this, 'searchFormatCallback'));
2.8 $obj->setField('ID', 'id', false);
2.9 $obj->setField('URL', 'url', false);
2.10
2.11 @@ -495,6 +494,8 @@
2.12 $this->_wordlength = 50;
2.13 }
2.14 $obj->setDefaultSort('hits');
2.15 + // set this only now, for compatibility with PHP 4
2.16 + $obj->setRowFunction(array($this, 'searchFormatCallback'));
2.17
2.18 // Start search timer
2.19 $searchtimer = new timerobject();