From: skodak Date: Wed, 25 Oct 2006 08:17:44 +0000 (+0000) Subject: fixed add new blog entry and tag edit in blog block; merged from MOODLE_17_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8af16e43bc1677dac0b141f9abde4bd15d58d050;p=moodle.git fixed add new blog entry and tag edit in blog block; merged from MOODLE_17_STABLE --- diff --git a/blocks/blog_menu/block_blog_menu.php b/blocks/blog_menu/block_blog_menu.php index 340d2b0822..e7752730d3 100755 --- a/blocks/blog_menu/block_blog_menu.php +++ b/blocks/blog_menu/block_blog_menu.php @@ -88,8 +88,8 @@ class block_blog_menu extends block_base { && (!$blogmodon || ($blogmodon && $coursearg != '')) && $CFG->bloglevel >= BLOG_USER_LEVEL ) { - // show Add entry link - moderation is off, or moderation is on and the user is viewing the block within the context of a course - if (has_capability('moodle/blog:create', $curcontext)) { + // show Add entry link + if (has_capability('moodle/blog:create', $sitecontext)) { $addentrylink = '
  • '.get_string('addnewentry', 'blog') ."
  • \n"; } @@ -113,9 +113,9 @@ class block_blog_menu extends block_base { $output .= get_string('viewsiteentries', 'blog')."\n"; } - if (isloggedin() && !isguest() - && (has_capability('moodle/blog:manageofficialtags', $sitecontext) - || has_capability('moodle/blog:managepersonaltags', $curcontext))) { + if (has_capability('moodle/blog:manageofficialtags', $sitecontext) + or has_capability('moodle/blog:managepersonaltags', $sitecontext) + or has_capability('moodle/blog:create', $sitecontext)) { $output .= '
  • '. link_to_popup_window("/blog/tags.php",'popup',get_string('tagmanagement'), 400, 500, 'Popup window', 'none', true) ."
  • \n"; }