[geeklog-cvs] geeklog: Better search compatibility for older plugins

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Wed Apr 22 18:35:50 EDT 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/fcd486b533bc
changeset: 6985:fcd486b533bc
user:      Sami Barakat
date:      Wed Apr 22 22:48:06 2009 +0100
description:
Better search compatibility for older plugins

diffstat:

1 file changed, 6 insertions(+), 2 deletions(-)
system/classes/search.class.php |    8 ++++++--

diffs (22 lines):

diff -r 85968eb69eb3 -r fcd486b533bc system/classes/search.class.php
--- a/system/classes/search.class.php	Mon Apr 20 18:45:41 2009 +0200
+++ b/system/classes/search.class.php	Wed Apr 22 22:48:06 2009 +0100
@@ -592,12 +592,16 @@
                 $col_hits = $this->_findColumn($result->searchheading, array($LANG09[50],$LANG09[23],'Downloads','Clicks'));//'Hits','Views'
 
                 $label = str_replace($LANG09[59], '', $result->searchlabel);
-
                 $num_results += $result->num_itemssearched;
 
                 // Extract the results
-                foreach ($result->searchresults as $old_row)
+                for ($i = 0; $i < 5; $i++)
                 {
+                    $j = ($i + ($page * 5)) - 5;
+                    if ($j >= count($result->searchresults))
+                        break;
+
+                    $old_row = $result->searchresults[$j];
                     if ($col_date != -1)
                     {
                         // Convert the date back to a timestamp



More information about the geeklog-cvs mailing list