@@ 1595-1607 (lines=13) @@ | ||
1592 | (last_post_id, last_poster_id, last_post_date, last_poster_name, last_poster_lastname, last_poster_firstname)*/ |
|
1593 | if ($id == '') { |
|
1594 | if (is_array($forum_list)) { |
|
1595 | foreach ($forum_list as $key => $value) { |
|
1596 | $last_post_info_of_forum = get_last_post_information( |
|
1597 | $key, |
|
1598 | api_is_allowed_to_edit(), |
|
1599 | $course_id |
|
1600 | ); |
|
1601 | $forum_list[$key]['last_post_id'] = $last_post_info_of_forum['last_post_id']; |
|
1602 | $forum_list[$key]['last_poster_id'] = $last_post_info_of_forum['last_poster_id']; |
|
1603 | $forum_list[$key]['last_post_date'] = $last_post_info_of_forum['last_post_date']; |
|
1604 | $forum_list[$key]['last_poster_name'] = $last_post_info_of_forum['last_poster_name']; |
|
1605 | $forum_list[$key]['last_poster_lastname'] = $last_post_info_of_forum['last_poster_lastname']; |
|
1606 | $forum_list[$key]['last_poster_firstname'] = $last_post_info_of_forum['last_poster_firstname']; |
|
1607 | } |
|
1608 | } else { |
|
1609 | $forum_list = array(); |
|
1610 | } |
|
@@ 5010-5018 (lines=9) @@ | ||
5007 | ||
5008 | // Finding the last post information (last_post_id, last_poster_id, last_post_date, last_poster_name, last_poster_lastname, last_poster_firstname). |
|
5009 | if (!empty($forum_list)) { |
|
5010 | foreach ($forum_list as $key => $value) { |
|
5011 | $last_post_info_of_forum = get_last_post_information($key, api_is_allowed_to_edit()); |
|
5012 | $forum_list[$key]['last_post_id'] = $last_post_info_of_forum['last_post_id']; |
|
5013 | $forum_list[$key]['last_poster_id'] = $last_post_info_of_forum['last_poster_id']; |
|
5014 | $forum_list[$key]['last_post_date'] = $last_post_info_of_forum['last_post_date']; |
|
5015 | $forum_list[$key]['last_poster_name'] = $last_post_info_of_forum['last_poster_name']; |
|
5016 | $forum_list[$key]['last_poster_lastname'] = $last_post_info_of_forum['last_poster_lastname']; |
|
5017 | $forum_list[$key]['last_poster_firstname'] = $last_post_info_of_forum['last_poster_firstname']; |
|
5018 | } |
|
5019 | } |
|
5020 | ||
5021 | return $forum_list; |