diff options
| author | Romain LE DISEZ <romain.git@ledisez.net> | 2009-06-24 23:40:47 +0200 | 
|---|---|---|
| committer | Romain LE DISEZ <romain.git@ledisez.net> | 2009-06-24 23:40:47 +0200 | 
| commit | be354ab98bbb08abad0a7efd6fb1d110e11381de (patch) | |
| tree | 067ac3ceb17059ca46c5a22de8fcefa4063a588a /modules | |
| parent | 6111272568a732465c330597a068a048f6705ef9 (diff) | |
Remove an useless ORDER BY.
It improves compatibility with PgSQL.
(Replay of c80d2da0a95a63b76f5a4c835f1a0e1022ec2f53)
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/gallery/models/item.php | 3 | 
1 files changed, 1 insertions, 2 deletions
| diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index 430119b5..7dbbbcb1 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -389,8 +389,7 @@ class Item_Model extends ORM_MPTT {        SELECT COUNT(*) AS position FROM {items}        WHERE parent_id = {$this->id}          AND `{$this->sort_column}` $comp (SELECT `{$this->sort_column}` -                                          FROM {items} WHERE id = $child_id) -      ORDER BY `{$this->sort_column}` {$this->sort_order}")->current()->position; +                                          FROM {items} WHERE id = $child_id)")->current()->position;      // We stopped short of our target value in the sort (notice that we're using a < comparator      // above) because it's possible that we have duplicate values in the sort column.  An | 
