Browse Source

Fix list forum posts with nested view

Angel Fernando Quiroz Campos 8 years ago
parent
commit
df8c977888
1 changed files with 2 additions and 2 deletions
  1. 2 2
      main/forum/forumfunction.inc.php

+ 2 - 2
main/forum/forumfunction.inc.php

@@ -1904,7 +1904,7 @@ function getPosts($forumInfo, $threadId, $orderDirection = 'ASC', $recursive = f
     $criteria = Criteria::create();
     $criteria
         ->where(Criteria::expr()->eq('threadId', $threadId))
-        ->andWhere(Criteria::expr()->eq('cId', api_get_course_int_id()))
+        ->andWhere(Criteria::expr()->eq('cId', $forumInfo['c_id']))
         ->andWhere($visibleCriteria)
     ;
 
@@ -1973,7 +1973,7 @@ function getPosts($forumInfo, $threadId, $orderDirection = 'ASC', $recursive = f
             }
         }
 
-        $list[$post->getIid()] = $postInfo;
+        $list[] = $postInfo;
 
         if (!$recursive) {
             continue;