Permalink
Browse files

Bug with the getFinalPosition

You forgot 1 case, duplicate the method getPrevPosition & getNextPosition
  • Loading branch information...
1 parent 9552c1d commit d1a0b224e3986e4e823d25ba4ff4981a9f3c35e6 @benji07 benji07 committed Oct 4, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/template/Sortable.php
@@ -478,6 +478,10 @@ public function getFinalPosition()
foreach($this->_options['uniqueBy'] as $field)
{
+ if(is_object($object[$field]))
+ {
+ $q->addWhere($field . ' = ?', $object[$field]['id']);
+ }
if (is_null($object[$field]))
{
$q->addWhere($field . ' IS NULL');

0 comments on commit d1a0b22

Please sign in to comment.