From 3c2d8363478f3f2cf1e2a148dca3cb48d1391254 Mon Sep 17 00:00:00 2001 From: Gusa Date: Sat, 15 Dec 2012 03:52:01 +0100 Subject: [PATCH] GeneralCategory, retrieve main using level 0. --- .../modules/category/templates/indexSuccess.php | 20 ++++++++------------ lib/model/doctrine/GeneralCategoryTable.class.php | 4 ++-- 2 files changed, 10 insertions(+), 14 deletions(-) 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'); } } -- 2.1.4