// Fix bug with position of features
This commit is contained in:
+2
-2
@@ -263,12 +263,12 @@ class FeatureCore extends ObjectModel
|
|||||||
* @param integer $position
|
* @param integer $position
|
||||||
* @return boolean Update result
|
* @return boolean Update result
|
||||||
*/
|
*/
|
||||||
public function updatePosition($way, $position, $id_feature)
|
public function updatePosition($way, $position, $id_feature = null)
|
||||||
{
|
{
|
||||||
if (!$res = Db::getInstance()->executeS('
|
if (!$res = Db::getInstance()->executeS('
|
||||||
SELECT `position`, `id_feature`
|
SELECT `position`, `id_feature`
|
||||||
FROM `'._DB_PREFIX_.'feature`
|
FROM `'._DB_PREFIX_.'feature`
|
||||||
WHERE `id_feature` = '.(int)($id_feature ? $id_feature : 1).'
|
WHERE `id_feature` = '.(int)($id_feature ? $id_feature : $this->id).'
|
||||||
ORDER BY `position` ASC'
|
ORDER BY `position` ASC'
|
||||||
))
|
))
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user