Skip to content

Commit

Permalink
MDL-3632 : this prevents people without mod/forum:viewhiddentimedpost…
Browse files Browse the repository at this point in the history
…s to see hiddentimedposts.
  • Loading branch information
scyrma committed Nov 19, 2007
1 parent d359ac1 commit ffb1306
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mod/forum/post_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function definition() {
$mform->addElement('checkbox', 'mailnow', get_string('mailnow', 'forum'));
}

if (!empty($CFG->forum_enabletimedposts) && !$post->parent) {
if (!empty($CFG->forum_enabletimedposts) && !$post->parent && has_capability('mod/forum:viewhiddentimedposts', $coursecontext)) {
$mform->addElement('header', '', get_string('displayperiod', 'forum'));

$mform->addElement('date_selector', 'timestart', get_string('displaystart', 'forum'), array('optional'=>true));
Expand Down

0 comments on commit ffb1306

Please sign in to comment.