From c78aedfa3cbfcebf22430af3d7bea2e34fab4638 Mon Sep 17 00:00:00 2001 From: Gustavo Martin Morcuende Date: Tue, 11 Dec 2012 03:40:04 +0100 Subject: [PATCH] Fixed error, CompanyCategory index web page. --- apps/companyfront/modules/category/templates/_list.php | 4 ++-- lib/model/doctrine/CompanyCategoryTable.class.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/companyfront/modules/category/templates/_list.php b/apps/companyfront/modules/category/templates/_list.php index a54fef0..59e05c8 100644 --- a/apps/companyfront/modules/category/templates/_list.php +++ b/apps/companyfront/modules/category/templates/_list.php @@ -34,7 +34,7 @@ - getId() != 1): ?> + getLevel() != 0): ?> @@ -42,7 +42,7 @@ - getId() != 1): ?> + getLevel() != 0): ?> ', 'category/delete?id='.$company_category->getId(), array('method' => 'delete', 'confirm' => 'Are you sure?')) ?> diff --git a/lib/model/doctrine/CompanyCategoryTable.class.php b/lib/model/doctrine/CompanyCategoryTable.class.php index ca668d9..69c4b1d 100644 --- a/lib/model/doctrine/CompanyCategoryTable.class.php +++ b/lib/model/doctrine/CompanyCategoryTable.class.php @@ -29,13 +29,13 @@ class CompanyCategoryTable extends Doctrine_Table { return $this->createQuery('cc')->where('cc.company_id = ?', $companyId) ->andWhere('cc.id != ?', $currentCategory) - ->orWhere('cc.id = ?', '1') + ->orWhere('cc.level = ?', '0') ->orderBy('cc.lft'); } else { return $this->createQuery('cc')->where('cc.company_id = ?', $companyId) - ->orWhere('cc.id = ?', '1') + ->orWhere('cc.level = ?', '0') ->orderBy('cc.lft'); } } -- 2.1.4