Commit 1677ae1d authored by Hugh Davenport's avatar Hugh Davenport Committed by Gerrit Code Review
Browse files

Merge "Use consistent ordering in plans, blog blocks"

parents 9a5f6fb7 fbb36134
......@@ -66,7 +66,7 @@ class PluginBlocktypeRecentposts extends PluginBlocktype {
AND a.parent IN ( ' . $artefactids . ' )
AND a.owner = (SELECT "owner" from {view} WHERE id = ?)
AND ' . $before . '
ORDER BY a.ctime DESC
ORDER BY a.ctime DESC, a.id DESC
LIMIT ' . $limit, array($instance->get('view')))) {
$mostrecent = array();
}
......
......@@ -65,7 +65,7 @@ class PluginBlocktypeTaggedposts extends SystemBlocktype {
WHERE a.artefacttype = \'blogpost\'
AND a.owner = (SELECT "owner" from {view} WHERE id = ?)
AND at.tag = ?
ORDER BY a.ctime DESC
ORDER BY a.ctime DESC, a.id DESC
LIMIT ?';
$results = get_records_sql_array($sql, array($view, $tagselect, $limit));
......
......@@ -693,7 +693,7 @@ class ArtefactTypeBlogPost extends ArtefactType {
a.id, a.title, a.description, a.author, a.authorname, ' .
db_format_tsfield('a.ctime', 'ctime') . ', ' . db_format_tsfield('a.mtime', 'mtime') . ',
a.locked, bp.published, a.allowcomments ' . $from . '
ORDER BY bp.published ASC, a.ctime DESC',
ORDER BY bp.published ASC, a.ctime DESC, a.id DESC',
array($id),
$offset, $limit
);
......
......@@ -533,7 +533,7 @@ class ArtefactTypeTask extends ArtefactType {
FROM {artefact} a
JOIN {artefact_plans_task} at ON at.artefact = a.id
WHERE a.artefacttype = 'task' AND a.parent = ?
ORDER BY at.completiondate ASC", array($plan), $offset, $limit))
ORDER BY at.completiondate ASC, a.id", array($plan), $offset, $limit))
|| ($results = array());
// format the date and setup completed for display if task is incomplete
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment