From 506c8d59eed98c4eb55c27cd3833c91e9c2cc252 Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Tue, 20 Aug 2013 15:31:42 +0800 Subject: [PATCH] MDL-41307 - tags: Update of the user object for fullname function. --- blog/locallib.php | 3 ++- tag/manage.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/blog/locallib.php b/blog/locallib.php index d743f70a280..97da6fbf81f 100644 --- a/blog/locallib.php +++ b/blog/locallib.php @@ -595,8 +595,9 @@ class blog_listing { $userid = $USER->id; } + $allnamefields = get_all_user_name_fields(true, 'u'); // The query used to locate blog entries is complicated. It will be built from the following components: - $requiredfields = "p.*, u.firstname, u.lastname, u.email"; // the SELECT clause + $requiredfields = "p.*, $allnamefields, u.email"; // the SELECT clause $tables = array('p' => 'post', 'u' => 'user'); // components of the FROM clause (table_id => table_name) $conditions = array('u.deleted = 0', 'p.userid = u.id', '(p.module = \'blog\' OR p.module = \'blog_external\')'); // components of the WHERE clause (conjunction) diff --git a/tag/manage.php b/tag/manage.php index 3a014b8b730..0a39c702553 100644 --- a/tag/manage.php +++ b/tag/manage.php @@ -225,9 +225,10 @@ if ($where) { $where = 'WHERE '. $where; } +$allusernames = get_all_user_name_fields(true, 'u'); $query = " SELECT tg.id, tg.name, tg.rawname, tg.tagtype, tg.flag, tg.timemodified, - u.id AS owner, u.firstname, u.lastname, + u.id AS owner, $allusernames, COUNT(ti.id) AS count FROM {tag} tg LEFT JOIN {tag_instance} ti ON ti.tagid = tg.id