diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2009-09-21 11:35:27 -0700 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2009-09-21 11:35:27 -0700 |
| commit | a6581ede0b7a50c6159eb5d36cf6be340a072609 (patch) | |
| tree | 9be79884a3c40b037da4e76d64d5bfefc7ea9d39 /modules/gallery/controllers/photos.php | |
| parent | 3ac3d1e520f95cc859d990000561dbb727411e0c (diff) | |
Fix Item_Model::get_position() so that our sort is stable when the comparison
row has a null value in the sort field. Fix for #627
Note: this changes get_position() to take an Item_Model instead of an id!
Diffstat (limited to 'modules/gallery/controllers/photos.php')
| -rw-r--r-- | modules/gallery/controllers/photos.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gallery/controllers/photos.php b/modules/gallery/controllers/photos.php index 79ad674a..e6154535 100644 --- a/modules/gallery/controllers/photos.php +++ b/modules/gallery/controllers/photos.php @@ -25,7 +25,7 @@ class Photos_Controller extends Items_Controller { public function _show($photo) { access::required("view", $photo); - $position = $photo->parent()->get_position($photo->id); + $position = $photo->parent()->get_position($photo); if ($position > 1) { list ($previous_item, $ignore, $next_item) = $photo->parent()->children(3, $position - 2); |
