Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac83a11
)
MDL-45594 core_message: ordered recent notifications by timecreated
author
Mark Nelson
<markn@moodle.com>
Sun, 29 Jun 2014 23:18:24 +0000
(16:18 -0700)
committer
Mark Nelson
<markn@moodle.com>
Thu, 17 Jul 2014 00:05:39 +0000
(17:05 -0700)
message/lib.php
patch
|
blob
|
blame
|
history
diff --git
a/message/lib.php
b/message/lib.php
index
18d4794
..
e3de0ab
100644
(file)
--- a/
message/lib.php
+++ b/
message/lib.php
@@
-788,7
+788,7
@@
function message_get_recent_notifications($user, $limitfrom=0, $limitto=100) {
FROM {message_read} mr
JOIN {user} u ON u.id=mr.useridfrom
WHERE mr.useridto = :userid1 AND u.deleted = '0' AND mr.notification = :notification
- ORDER BY mr.
id DESC";//ordering by id should give the same result as ordering by timecreated but will be faster
+ ORDER BY mr.
timecreated DESC";
$params = array('userid1' => $user->id, 'notification' => 1);
$notifications = $DB->get_records_sql($sql, $params, $limitfrom, $limitto);