Skip to content

Commit

Permalink
Merge branch 'wip-MDL-41307-master' of git://github.com/abgreeve/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Damyon Wiese committed Aug 27, 2013
2 parents a6163e7 + 506c8d5 commit f5a791e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion blog/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,9 @@ public function get_entry_fetch_sql($count=false, $sort='lastmodified DESC', $us
$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)

Expand Down
3 changes: 2 additions & 1 deletion tag/manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,10 @@
$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
Expand Down

0 comments on commit f5a791e

Please sign in to comment.