// Merge -> revision 9061

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9069 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-10-05 15:21:55 +00:00
parent 51de6be6cc
commit b4d436ca21
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)));