[geeklog-cvs] geeklog: E_ALL fix

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Nov 8 07:58:41 EST 2009


changeset 7461:026789ae2533
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/026789ae2533
user: Dirk Haun <dirk at haun-online.de>
date: Sun Nov 08 13:47:41 2009 +0100
description:
E_ALL fix

diffstat:

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

diffs (23 lines):

diff -r 1c2d87e8c9e2 -r 026789ae2533 system/classes/listfactory.class.php
--- a/system/classes/listfactory.class.php	Sun Nov 08 12:26:46 2009 +0100
+++ b/system/classes/listfactory.class.php	Sun Nov 08 13:47:41 2009 +0100
@@ -479,13 +479,17 @@
         $num_query_results = $this->_per_page - $this->_total_found;
         $pp_total = $this->_total_found;
         $limits = array();
-        for ($i = 0; $i < count($this->_sources_arr); $i++)
-        {
+        $num = count($this->_sources_arr);
+        for ($i = 0; $i < $num; $i++) {
             $limits[$i]['total'] = $this->_getTotal($this->_sources_arr[$i]);
             $limits[$i]['pp'] = round(($this->_sources_arr[$i]['rank'] / $this->_total_rank) * $num_query_results);
             $this->_total_found += $limits[$i]['total'];
             $pp_total += $limits[$i]['pp'];
         }
+        if ($num == 0) {
+            $limits[0]['total'] = 0;
+            $limits[0]['pp'] = 0;
+        }
         if ($pp_total < $this->_per_page) {
             $limits[0]['pp'] += $this->_per_page - $pp_total;
         } else if ($this->_per_page < $pp_total) {



More information about the geeklog-cvs mailing list