From 88b525074db63dd509e7a2b828131d4adb6be8a3 Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Sun, 10 Jan 2016 17:08:58 +0100 Subject: [PATCH] baculum: Fix sorting in restore by group most recent backups --- gui/baculum/protected/Class/JobManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/baculum/protected/Class/JobManager.php b/gui/baculum/protected/Class/JobManager.php index bb90b4401b..ee7013f9f9 100644 --- a/gui/baculum/protected/Class/JobManager.php +++ b/gui/baculum/protected/Class/JobManager.php @@ -66,7 +66,7 @@ class JobManager extends TModule { $sql = "name='$jobname' AND clientid='$clientid' AND jobstatus IN ('T', 'W') AND level IN ('F', 'I', 'D')"; $finder = JobRecord::finder(); $criteria = new TActiveRecordCriteria; - $order = 'endtime'; + $order = 'EndTime'; $cfg = $this->Application->getModule('configuration'); $appCfg = $cfg->getApplicationConfig(); if($cfg->isPostgreSQLType($appCfg['db']['type'])) { @@ -74,7 +74,7 @@ class JobManager extends TModule { } $criteria->OrdersBy[$order] = 'desc'; $criteria->Condition = $sql; - $jobs = $finder->findAll($sql); + $jobs = $finder->findAll($criteria); $jobids = array(); $waitForFull = false; -- 2.39.5