Skip to content

Commit

Permalink
MDL-58670 blog: respect capability to search entries
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaglancy authored and Mr. Jenkins (CiBoT) committed May 3, 2017
1 parent b7fcd09 commit 99fbcc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blog/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ function blog_get_headers($courseid=null, $groupid=null, $userid=null, $tagid=nu
}

// Append Search info.
if (!empty($search)) {
if (!empty($search) && has_capability('moodle/blog:search', $sitecontext)) {
$headers['filters']['search'] = $search;
$blogurl->param('search', $search);
$PAGE->navbar->add(get_string('searchterm', 'blog', $search), $blogurl->out());
Expand Down

0 comments on commit 99fbcc7

Please sign in to comment.