Răsfoiți Sursa

Ticket #3769 - Discussions: DB error in search results.

AntonLV 4 ani în urmă
părinte
comite
ed000bffb6
1 a modificat fișierele cu 6 adăugiri și 2 ștergeri
  1. 6 2
      modules/boonex/forum/classes/BxForumGrid.php

+ 6 - 2
modules/boonex/forum/classes/BxForumGrid.php

@@ -629,18 +629,22 @@ class BxForumGrid extends BxTemplGrid
 
     protected function _getSqlWhereFromConditionAuthorComment($aCnd)
     {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
         $aEntriesIds = $this->_oModule->_oDb->getComments(array('type' => 'entries_author_search', 'author' => $aCnd['val']));
         if(!empty($aEntriesIds) && is_array($aEntriesIds))
-            return array('fld' => 'id', 'val' => $aEntriesIds, 'opr' => 'IN');
+            return array('tbl' => $CNF['TABLE_ENTRIES'], 'fld' => 'id', 'val' => $aEntriesIds, 'opr' => 'IN');
 
         return '';
     }
 
     protected function _getSqlWhereFromConditionKeywordComment($aCnd)
     {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
         $aEntriesIds = $this->_oModule->_oDb->getComments(array('type' => 'entries_keyword_search', 'keyword' => $aCnd['val']));
         if(!empty($aEntriesIds) && is_array($aEntriesIds))
-            return array('fld' => 'id', 'val' => $aEntriesIds, 'opr' => 'IN');
+            return array('tbl' => $CNF['TABLE_ENTRIES'], 'fld' => 'id', 'val' => $aEntriesIds, 'opr' => 'IN');
 
         return '';
     }