From c80d2da0a95a63b76f5a4c835f1a0e1022ec2f53 Mon Sep 17 00:00:00 2001 From: Romain LE DISEZ Date: Tue, 23 Jun 2009 10:09:46 +0200 Subject: Remove an useless ORDER BY. It improves compatibility with PgSQL. --- modules/gallery/models/item.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index 7dce9e51..44d79d5b 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -382,8 +382,7 @@ class Item_Model extends ORM_MPTT { SELECT COUNT(*) AS position FROM {items} WHERE parent_id = {$this->id} AND {$this->sort_column} <= (SELECT {$this->sort_column} - FROM {items} WHERE id = $child_id) - ORDER BY {$this->sort_column} {$this->sort_order}"); + FROM {items} WHERE id = $child_id)"); return $result->current()->position; } -- cgit v1.2.3