From: Gusa Date: Sat, 15 Dec 2012 02:52:01 +0000 (+0100) Subject: GeneralCategory, retrieve main using level 0. X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=3c2d8363478f3f2cf1e2a148dca3cb48d1391254;p=mobi%2F.git GeneralCategory, retrieve main using level 0. --- diff --git a/apps/userfront/modules/category/templates/indexSuccess.php b/apps/userfront/modules/category/templates/indexSuccess.php index b86a81c..dbe2b59 100644 --- a/apps/userfront/modules/category/templates/indexSuccess.php +++ b/apps/userfront/modules/category/templates/indexSuccess.php @@ -69,18 +69,14 @@ } ?>> - getLevel() != '0'): ?> - getUserBaskets() as $userBasket): ?> - getUserId() == $userId): ?> - checked - - - - > - - - + getUserBaskets() as $userBasket): ?> + getUserId() == $userId): ?> + checked + + + + > diff --git a/lib/model/doctrine/GeneralCategoryTable.class.php b/lib/model/doctrine/GeneralCategoryTable.class.php index a33719b..007abd0 100644 --- a/lib/model/doctrine/GeneralCategoryTable.class.php +++ b/lib/model/doctrine/GeneralCategoryTable.class.php @@ -19,13 +19,13 @@ class GeneralCategoryTable extends Doctrine_Table /** - * Returns general categories, ordered by lft field. + * Returns general categories skipping main category and ordered by lft field. * * @return Doctrine Query */ public function getGeneralCategoriesByLftQuery() { - return $this->createQuery('gc')->where('gc.id != 1') + return $this->createQuery('gc')->where('gc.level != 0') ->orderBy('gc.lft'); } }