// Merge -> revision 9061

This commit is contained in:
rMalie
2011-10-05 15:21:55 +00:00
parent d8f04cedb7
commit bbc6c6bdc4
53 changed files with 795 additions and 456 deletions
+6
View File
@@ -1004,6 +1004,12 @@ class CategoryCore extends ObjectModel
return $return;
}
/** this function return the number of category + 1 having $id_category_parent as parent.
*
* @todo rename that function to make it understandable (getNewLastPosition for example)
* @param int $id_category_parent the parent category
* @return int
*/
public static function getLastPosition($id_category_parent)
{
return (Db::getInstance()->getValue('SELECT MAX(position)+1 FROM `'._DB_PREFIX_.'category` WHERE `id_parent` = '.(int)($id_category_parent)));