Skip to content

Commit

Permalink
MDL-55994 blog: Resolve warning messages in RSS feed generation
Browse files Browse the repository at this point in the history
  • Loading branch information
bostelm committed Nov 6, 2016
1 parent 7eb3467 commit f8b56ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blog/rsslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ function blog_rss_get_feed($context, $args) {
if ($blogentries) {
$items = array();
foreach ($blogentries as $blogentry) {
$item = null;
$item = new stdClass();
$item->author = fullname($DB->get_record('user', array('id' => $blogentry->userid))); // TODO: this is slow.
$item->title = $blogentry->subject;
$item->pubdate = $blogentry->lastmodified;
Expand All @@ -234,7 +234,7 @@ function blog_rss_get_feed($context, $args) {

switch ($type) {
case 'user':
$info = fullname($DB->get_record('user', array('id' => $id), 'firstname,lastname'));
$info = fullname($DB->get_record('user', array('id' => $id), get_all_user_name_fields(true)));
break;
case 'course':
$info = $DB->get_field('course', 'fullname', array('id' => $id));
Expand Down

0 comments on commit f8b56ac

Please sign in to comment.