From 962a43b7316aabf1e0525ab586567718da976eec Mon Sep 17 00:00:00 2001 From: Gusa Date: Sat, 15 Dec 2012 01:58:54 +0100 Subject: [PATCH] Users may not use main category (Producto) for ads --- lib/model/doctrine/CompanyCategoryTable.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/model/doctrine/CompanyCategoryTable.class.php b/lib/model/doctrine/CompanyCategoryTable.class.php index 0d4bafc..692b543 100644 --- a/lib/model/doctrine/CompanyCategoryTable.class.php +++ b/lib/model/doctrine/CompanyCategoryTable.class.php @@ -27,7 +27,7 @@ class CompanyCategoryTable extends Doctrine_Table { if ($currentCategory != null) { - return $this->createQuery('cc')->where('cc.level = ?', '0') + return $this->createQuery('cc')->where('cc.level != ?', '0') ->orWhere('cc.company_id = ?', $companyId) ->andWhere('cc.lft > ? or cc.lft < ?', array($currentRgt, $currentLft)) ->orderBy('cc.lft'); @@ -35,7 +35,7 @@ class CompanyCategoryTable extends Doctrine_Table else { return $this->createQuery('cc')->where('cc.company_id = ?', $companyId) - ->orWhere('cc.level = ?', '0') + ->orWhere('cc.level != ?', '0') ->orderBy('cc.lft'); } } -- 2.1.4