Browse files

Reverted changes in ver 1.401, as this is ultimately fixed by bumping…

… the version number
  • Loading branch information...
1 parent 6dce1da commit 0fcac008cb03503edac892f7e6fd9ce4f27ffb36 patrickslee committed Nov 18, 2005
Showing with 7 additions and 10 deletions.
  1. +7 −10 mod/forum/lib.php
View
17 mod/forum/lib.php
@@ -1158,7 +1158,7 @@ function forum_get_unmailed_posts($starttime, $endtime) {
AND p.discussion = d.id
AND ((d.timestart = 0 OR d.timestart <= '$now')
AND (d.timeend = 0 OR d.timeend > '$now'))
- ORDER BY p.modified ASC");/**/
+ ORDER BY p.modified ASC");
}
function forum_mark_old_posts_as_mailed($endtime) {
@@ -1305,10 +1305,8 @@ function forum_get_discussions($forum="0", $forumsort="d.timemodified DESC",
$user=0, $fullpost=true, $visiblegroups=-1, $limit=0, $userlastmodified=false) {
/// Get all discussions in a forum
global $CFG, $USER;
- //fix for bug #4336
- $thisforum = get_record('forum','id',$forum);
- //fix for bug #4336
- if ((isadmin() and !empty($CFG->admineditalways)) || isteacher(get_field('forum', 'course', 'id', $forum)) || $thisforum->type == 'news') {
+
+ if ((isadmin() and !empty($CFG->admineditalways)) || isteacher(get_field('forum', 'course', 'id', $forum))) {
$timelimit = '';
} else {
$now = time();
@@ -1364,8 +1362,8 @@ function forum_get_discussions($forum="0", $forumsort="d.timemodified DESC",
$umtable
WHERE d.forum = '$forum'
AND p.parent = 0
- $timelimit $groupselect $userselect
- ORDER BY $forumsort $limit");/**/
+ $timelimit $groupselect $userselect
+ ORDER BY $forumsort $limit");
} else {
return get_records_sql("SELECT $postdata, d.name, d.timemodified, d.usermodified, d.groupid,
u.firstname, u.lastname, u.email, u.picture $umfields
@@ -1377,8 +1375,8 @@ function forum_get_discussions($forum="0", $forumsort="d.timemodified DESC",
AND p.discussion = d.id
AND p.parent = 0
AND p.userid = u.id
- $timelimit $groupselect $userselect
- ORDER BY $forumsort $limit");/**/
+ $timelimit $groupselect $userselect
+ ORDER BY $forumsort $limit");
}
}
@@ -1771,7 +1769,6 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link
$age = time() - $post->created;
/// Hack for allow to edit news posts those are not displayed yet until they are displayed
-
if (!$post->parent
&& get_field('forum', 'type', 'id', $post->forum) == 'news'
&& get_field_sql("SELECT id FROM {$CFG->prefix}forum_discussions WHERE id = $post->discussion AND timestart > ".time())) {

0 comments on commit 0fcac00

Please sign in to comment.