MDL-42579 Glossary: Fix debug notice from missing name fields.
authorStephen Bourget <sbourget@goffstown.k12.nh.us>
Wed, 30 Oct 2013 02:56:53 +0000 (22:56 -0400)
committerStephen Bourget <sbourget@goffstown.k12.nh.us>
Wed, 30 Oct 2013 02:56:53 +0000 (22:56 -0400)
mod/glossary/rsslib.php

index 6a51b2f..66b2ffc 100644 (file)
 
             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;
         }
 
         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,
                       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