summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-22 17:26:26 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-22 17:26:26 +0200
commit57b9ae18f055904f2a57f050b74a6640cb2f17b9 (patch)
treedf54643a9aec1320fb606f3f21bba160a6a29a60 /lib
parent98431b490e6ff013dbda7b3f6c9db13dc23868c1 (diff)
parent3e1dc647376c998f5e7752e8e7b39582144e1398 (diff)
downloadnextcloud-server-57b9ae18f055904f2a57f050b74a6640cb2f17b9.tar.gz
nextcloud-server-57b9ae18f055904f2a57f050b74a6640cb2f17b9.zip
Merge pull request #24196 from owncloud/backport-24183-change-background-job-sort-order
[9.0] Change the sort order of background jobs to be DESC instead of ASC
Diffstat (limited to 'lib')
-rw-r--r--lib/private/backgroundjob/joblist.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/backgroundjob/joblist.php b/lib/private/backgroundjob/joblist.php
index b8230fca4de..2429b830446 100644
--- a/lib/private/backgroundjob/joblist.php
+++ b/lib/private/backgroundjob/joblist.php
@@ -172,8 +172,8 @@ class JobList implements IJobList {
$query = $this->connection->getQueryBuilder();
$query->select('*')
->from('jobs')
- ->where($query->expr()->gt('id', $query->createNamedParameter($lastId, IQueryBuilder::PARAM_INT)))
- ->orderBy('id', 'ASC')
+ ->where($query->expr()->lt('id', $query->createNamedParameter($lastId, IQueryBuilder::PARAM_INT)))
+ ->orderBy('id', 'DESC')
->setMaxResults(1);
$result = $query->execute();
$row = $result->fetch();
@@ -187,7 +187,7 @@ class JobList implements IJobList {
$query = $this->connection->getQueryBuilder();
$query->select('*')
->from('jobs')
- ->orderBy('id', 'ASC')
+ ->orderBy('id', 'DESC')
->setMaxResults(1);
$result = $query->execute();
$row = $result->fetch();