Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-27814 blogs: Remove redundant code

Since all blog pages are in system context always, it is useless to try to get course/mod params from page context
  • Loading branch information...
commit a11caae7d4cc1b7b7c476ff72b48137bac25d11d 1 parent 68fc1cc
@ankitagarwal ankitagarwal authored
Showing with 0 additions and 17 deletions.
  1. +0 −17 blog/lib.php
View
17 blog/lib.php
@@ -699,23 +699,6 @@ function blog_get_headers($courseid=null, $groupid=null, $userid=null, $tagid=nu
$blogurl = new moodle_url('/blog/index.php');
- // If the title is not yet set, it's likely that the context isn't set either, so skip this part
- $pagetitle = $PAGE->title;
- if (!empty($pagetitle)) {
- $contexturl = blog_get_context_url();
-
- // Look at the context URL, it may have additional params that are not in the current URL
- if (!$blogurl->compare($contexturl)) {
- $blogurl = $contexturl;
- if (empty($courseid)) {
- $courseid = $blogurl->param('courseid');
- }
- if (empty($modid)) {
- $modid = $blogurl->param('modid');
- }
- }
- }
-
$headers['stradd'] = get_string('addnewentry', 'blog');
$headers['strview'] = null;
Please sign in to comment.
Something went wrong with that request. Please try again.