From 43921b8a5a606d93263b200817e3622807297326 Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 23 Aug 2004 02:05:42 +0000 Subject: [PATCH] Using the "parent" style of linking to the last post for browser speed, and also addressed some of PJs documentation concerns ;-) --- mod/forum/lib.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 466ea04f6c..8c8bc3e82e 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -1578,6 +1578,12 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link // *** THIS IS MISLEADING AT BEST AND SHOULD BE CORRECTED!!! *** function forum_print_discussion_header(&$post, $forum, $datestring="") { +/// This function prints the overview of a discussion in the forum listing. +/// It needs some discussion information and some post information, these +/// happen to be combined for efficiency in the $post parameter by the function +/// that calls this one +/// forum_print_latest_discussions() + global $THEME, $USER, $CFG; if (!empty($CFG->filterall)) { @@ -1609,15 +1615,9 @@ function forum_print_discussion_header(&$post, $forum, $datestring="") { } echo "cellcontent2\" class=\"forumpostheaderdate\" align=right nowrap>"; - - // [pj] This is also VERY suspicious, as it discriminates between a post record and a discussion record - // based on the presence of the timemodified field WITHOUT SAYING ANYTHING. Ummm.... documentation, anyone? - - if (!empty($post->timemodified)) { - echo ''.userdate($post->timemodified, $datestring).''; - } else { - echo userdate($post->modified, $datestring); - } + $usedate = (empty($post->timemodified)) ? $post->modified : $post->timemodified; // Just in case + echo ''. + userdate($usedate, $datestring).''; echo "\n"; echo "\n"; -- 2.39.5