diff --git a/core/components/gallery/processors/mgr/item/sort.php b/core/components/gallery/processors/mgr/item/sort.php index 6f13021..0833eea 100644 --- a/core/components/gallery/processors/mgr/item/sort.php +++ b/core/components/gallery/processors/mgr/item/sort.php @@ -48,7 +48,7 @@ AND rank > 0 "); $newRank = $target->get('rank'); -} else { +} elseif($source->get('rank') > $target->get('rank')) { $modx->exec(" UPDATE {$modx->getTableName('galAlbumItem')} SET rank = rank + 1 @@ -62,4 +62,4 @@ $source->set('rank',$newRank); $source->save(); -return $modx->error->success(); \ No newline at end of file +return $modx->error->success();