From: Marcin Haba Date: Sun, 10 Jan 2016 16:08:58 +0000 (+0100) Subject: baculum: Fix sorting in restore by group most recent backups X-Git-Tag: Release-7.4.0~27 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=88b525074db63dd509e7a2b828131d4adb6be8a3;p=bacula%2Fbacula baculum: Fix sorting in restore by group most recent backups --- 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;