From bd56062327256ae37a5221a4e6182eed74d30ccb Mon Sep 17 00:00:00 2001 From: Stephen Bourget Date: Tue, 29 Oct 2013 22:56:53 -0400 Subject: [PATCH] MDL-42579 Glossary: Fix debug notice from missing name fields. --- mod/glossary/rsslib.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/mod/glossary/rsslib.php b/mod/glossary/rsslib.php index 6a51b2f3604..66b2ffcc2e2 100644 --- a/mod/glossary/rsslib.php +++ b/mod/glossary/rsslib.php @@ -86,14 +86,10 @@ foreach ($recs as $rec) { $item = new stdClass(); - $user = new stdClass(); $item->title = $rec->entryconcept; if ($glossary->rsstype == 1) {//With author - $user->firstname = $rec->userfirstname; - $user->lastname = $rec->userlastname; - - $item->author = fullname($user); + $item->author = fullname($rec); } $item->pubdate = $rec->entrytimecreated; @@ -149,6 +145,7 @@ } if ($glossary->rsstype == 1) {//With author + $allnamefields = get_all_user_name_fields(true,'u'); $sql = "SELECT e.id AS entryid, e.concept AS entryconcept, e.definition AS entrydefinition, @@ -156,8 +153,7 @@ e.definitiontrust AS entrytrust, e.timecreated AS entrytimecreated, u.id AS userid, - u.firstname AS userfirstname, - u.lastname AS userlastname + $allnamefields FROM {glossary_entries} e, {user} u WHERE e.glossaryid = {$glossary->id} AND