// Fix bug with position of features

This commit is contained in:
mDeflotte
2012-06-18 07:43:43 +00:00
parent 008b5826f5
commit 9d5bcf5cc9
+2 -2
View File
@@ -263,12 +263,12 @@ class FeatureCore extends ObjectModel
* @param integer $position
* @return boolean Update result
*/
public function updatePosition($way, $position, $id_feature)
public function updatePosition($way, $position, $id_feature = null)
{
if (!$res = Db::getInstance()->executeS('
SELECT `position`, `id_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'
))
return false;