From 72be6d6e5f587cdf36ea7abfe5a944f845b9f923 Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Mon, 25 Apr 2011 01:52:56 +0100 Subject: [PATCH] Bug fixes 1) Quoted barewords in array construction 2) Added order by clause to all() to provide consistent ordering --- source/lib/RippingCluster/Job.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/lib/RippingCluster/Job.class.php b/source/lib/RippingCluster/Job.class.php index 4232489..632820c 100644 --- a/source/lib/RippingCluster/Job.class.php +++ b/source/lib/RippingCluster/Job.class.php @@ -111,7 +111,7 @@ class RippingCluster_Job { $jobs = array(); $database = RippingCluster_Main::instance()->database(); - foreach ($database->selectList('SELECT * FROM jobs WHERE id > 0') as $row) { + foreach ($database->selectList('SELECT * FROM jobs WHERE id > 0 ORDER BY id DESC') as $row) { $job = self::fromDatabaseRow($row); self::$cache[$job->id] = $job; @@ -212,7 +212,7 @@ class RippingCluster_Job { $database->update( 'DELETE FROM jobs WHERE id=:job_id LIMIT 1', array( - array(name => 'job_id', value => $this->id, type => PDO::PARAM_INT), + array('name' => 'job_id', 'value' => $this->id, 'type' => PDO::PARAM_INT), ) );