diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-09-07 21:04:38 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-09-07 21:04:38 -0700 |
commit | ab880120e69b27bdcfed07d3b0729108326b335d (patch) | |
tree | 23af2f21ba41e737916206dcbc7175c528438810 /modules/gallery/models | |
parent | 2f94dfc67c809ae356e5d3e1a5ab21c7ba0a2a27 (diff) |
The G2 import sets the sort_order to "asc"/"desc" but
Item_Model::get_position() expects "DESC". This breaks navigation in
any album imported from G2 that has a descending sort order.
Two things:
1) Use "ASC"/"DESC" in G2 import for consistency
2) Make Item_Model::get_position() more robust against capitalization
Fixes ticket #1334.
Diffstat (limited to 'modules/gallery/models')
-rw-r--r-- | modules/gallery/models/item.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index 34c22021..485cd8cf 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -530,7 +530,7 @@ class Item_Model extends ORM_MPTT { * the first child in the album is at position 1. */ public function get_position($child, $where=array()) { - if ($this->sort_order == "DESC") { + if (!strcasecmp($this->sort_order, "DESC")) { $comp = ">"; } else { $comp = "<"; |