Revision: 12784
http://sourceforge.net/p/xoops/svn/12784
Author: luciorota
Date: 2014-09-16 20:57:03 +0000 (Tue, 16 Sep 2014)
Log Message:
-----------
fixed bug
Modified Paths:
--------------
XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/functions.php
XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/search.inc.php
Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/functions.php
===================================================================
--- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/functions.php 2014-09-16 20:35:59 UTC (rev 12783)
+++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/functions.php 2014-09-16 20:57:03 UTC (rev 12784)
@@ -904,7 +904,7 @@
}
$averageRating = $totalRating / $ratings_count;
$averageRating = number_format($averageRating, 4);
- $downloadOb = $wfdownloads->getHandler('download')->get($lid);
+ $downloadObj = $wfdownloads->getHandler('download')->get($lid);
$downloadObj->setVar('rating', $averageRating);
$downloadObj->setVar('votes', $ratings_count);
$wfdownloads->getHandler('download')->insert($downloadObj);
Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/search.inc.php
===================================================================
--- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/search.inc.php 2014-09-16 20:35:59 UTC (rev 12783)
+++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/search.inc.php 2014-09-16 20:57:03 UTC (rev 12784)
@@ -56,6 +56,8 @@
// because count() returns 1 even if a supplied variable
// is not an array, we must check if $querryarray is really an array
$queryArray_count = 0;
+ $downloadObjs = array();
+
if ((is_array($queryArray) && $queryArray_count = count($queryArray)) || $userId != 0) {
// $userId != 0 added August 13 2007 -- ACCOUNTS FOR CASES WHERE THERE ARE NO QUERY TERMS BUT A USER ID IS PASSED -- FREEFORM SOLUTIONS
if ($queryArray_count == 0) {
@@ -123,7 +125,6 @@
}
}
- $downloadObjs = array();
// Loop through all query terms
for ($i = 0; $i < $queryArray_count; ++$i) {
// Make a copy of the $criteria for use with this term only
|