Permalink
Browse files

Made forum search page aware of Embargoed Announcements

  • Loading branch information...
1 parent 79598cf commit abbb3308a2223df8c9ea3de8e15fb624812571e6 patrickslee committed Nov 13, 2005
Showing with 10 additions and 0 deletions.
  1. +10 −0 mod/forum/search.php
View
@@ -187,6 +187,16 @@
error("Could not find forum $discussion->forum");
}
+ if ($forum->type == "news") { // Skip if is hidden
+ if (!((isadmin() and !empty($CFG->admineditalways))
+ || isteacher($course->id)
+ || $USER->id == $discussion->userid
+ || (($discussion->timestart == 0 || $discussion->timestart <= time())
+ && ($discussion->timeend == 0 || $discussion->timeend > time())))) {
+ continue;
+ }
+ }
+
$post->subject = highlight($strippedsearch, $post->subject);
$discussion->name = highlight($strippedsearch, $discussion->name);

0 comments on commit abbb330

Please sign in to comment.