Skip to content

Commit

Permalink
Merged changes from stable
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Aug 26, 2004
1 parent c14964b commit ac00b90
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions mod/forum/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,8 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link
$stredit = get_string("edit", "forum");
$strdelete = get_string("delete", "forum");
$strreply = get_string("reply", "forum");
$strparent = get_string("parent", "forum");
$strprune = get_string("prune", "forum");
$strpruneheading = get_string("pruneheading", "forum");
$threadedmode = (!empty($USER->mode) and ($USER->mode == FORUM_MODE_THREADED));
$isteacher = isteacher($courseid);
$adminedit = (isadmin() and !empty($CFG->admineditalways));
Expand Down Expand Up @@ -1502,11 +1503,10 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link
}

if (isteacheredit($courseid) and $post->parent) {
echo "<a href=\"$CFG->wwwroot/mod/forum/post.php?prune=$post->id\" title=\"".get_string('pruneheading', 'forum').'">'.
get_string("prune", "forum")."</a> | ";
echo "<a href=\"$CFG->wwwroot/mod/forum/post.php?prune=$post->id\" title=\"$strpruneheading\">$strprune</a> | ";
}

if ($ownpost or $isteacher) {
if (($ownpost and $age < $CFG->maxeditingtime) or $isteacher) {
echo "<a href=\"$CFG->wwwroot/mod/forum/post.php?delete=$post->id\">$strdelete</a>";
if ($reply) {
echo " | ";
Expand Down Expand Up @@ -1609,7 +1609,8 @@ function forum_print_discussion_header(&$post, $forum, $datestring="") {

echo "<td bgcolor=\"$THEME->cellcontent2\" class=\"forumpostheaderdate\" align=right nowrap>";
$usedate = (empty($post->timemodified)) ? $post->modified : $post->timemodified; // Just in case
echo '<a href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.$post->discussion.'&parent='.$post->lastpostid.'">'.
$parenturl = (empty($post->lastpostid)) ? '' : '&parent='.$post->lastpostid;
echo '<a href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.$post->discussion.$parenturl.'">'.
userdate($usedate, $datestring).'</a>';
echo "</td>\n";

Expand Down

0 comments on commit ac00b90

Please sign in to comment.