diff --git a/blog/header.php b/blog/header.php index 43dc91be13c..b3f29c74eac 100755 --- a/blog/header.php +++ b/blog/header.php @@ -186,6 +186,14 @@ if ($ME == $CFG->wwwroot.'/blog/edit.php') { /// We are in edit mode, print the } /// close switch +// prints the tabs +$currenttab = 'blogs'; +$user = $USER; +if (!$course) { + $course = get_record('course','id',optional_param('courseid', SITEID, PARAM_INT)); +} +require_once($CFG->dirroot .'/user/tabs.php'); + $editing = false; if ($PAGE->user_allowed_editing()) { $editing = $PAGE->user_is_editing(); diff --git a/blog/index.php b/blog/index.php index 1dbb28bff1a..ebae25a4a36 100755 --- a/blog/index.php +++ b/blog/index.php @@ -139,14 +139,6 @@ if ($limit == 'none') { include($CFG->dirroot .'/blog/header.php'); -// prints the tabs -$currenttab = 'blogs'; -$user = $USER; -if (!$course) { - $course = get_record('course','id',optional_param('courseid', SITEID, PARAM_INT)); -} -require_once($CFG->dirroot .'/user/tabs.php'); - $blogpage = optional_param('blogpage',0,PARAM_INT); blog_print_html_formatted_entries($userid, $postid, $limit, ($blogpage * $limit) ,$filtertype, $filterselect, $tagid, $tag, $filtertype, $filterselect);