]> git.sur5r.net Git - bacula/bacula/commitdiff
baculum: Fix sorting in restore by group most recent backups
authorMarcin Haba <marcin.haba@bacula.pl>
Sun, 10 Jan 2016 16:08:58 +0000 (17:08 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Sun, 10 Jan 2016 16:10:13 +0000 (17:10 +0100)
gui/baculum/protected/Class/JobManager.php

index bb90b4401bdf44c9c8f34371e8e2a92fbcb88b80..ee7013f9f9ec572e22740f2b1198193b0891c8c7 100644 (file)
@@ -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;