Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'wip-MDL-30539-stable21' of git://github.com/phalacee/mo…

…odle into MOODLE_21_STABLE
  • Loading branch information...
commit ee7f8610dbab1aa51b53f282f8fa9e2956310552 2 parents 364622b + 440c440
@nebgor nebgor authored
Showing with 14 additions and 2 deletions.
  1. +7 −0 blog/lib.php
  2. +1 −0  lang/en/blog.php
  3. +6 −2 lib/navigationlib.php
View
7 blog/lib.php
@@ -479,6 +479,13 @@ function blog_get_options_for_user(stdClass $user=null) {
);
}
}
+ if ($canview && $CFG->enablerssfeeds) {
+ $options['rss'] = array(
+ 'string' => get_string('rssfeed', 'blog'),
+ 'link' => new moodle_url(rss_get_url($sitecontext->id, $USER->id, 'blog', 'user/'.$user->id))
+ );
+ }
+
// Cache the options
$useroptions[$user->id] = $options;
// Return the options
View
1  lang/en/blog.php
@@ -138,6 +138,7 @@
$string['readfirst'] = 'Read this first';
$string['relatedblogentries'] = 'Related blog entries';
$string['retrievedfrom'] = 'Retrieved from';
+$string['rssfeed'] = 'Blog RSS feed';
$string['searchterm'] = 'Search: {$a}';
$string['settingsupdatederror'] = 'An error has occurred, blog preference setting could not be updated';
$string['siteblog'] = 'Site blog: {$a}';
View
8 lib/navigationlib.php
@@ -1944,8 +1944,12 @@ protected function load_for_user($user=null, $forceforcontext=false) {
if (count($options) > 0) {
$blogs = $usernode->add(get_string('blogs', 'blog'), null, navigation_node::TYPE_CONTAINER);
- foreach ($options as $option) {
- $blogs->add($option['string'], $option['link']);
+ foreach ($options as $type => $option) {
+ if ($type == "rss") {
+ $blogs->add($option['string'], $option['link'], settings_navigation::TYPE_SETTING, null, null, new pix_icon('i/rss', ''));
+ } else {
+ $blogs->add($option['string'], $option['link']);
+ }
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.