From c29ca5f7dbab0da148c9dc815db64324fd168472 Mon Sep 17 00:00:00 2001 From: Gusa Date: Sat, 15 Dec 2012 02:18:49 +0100 Subject: [PATCH] Uers may not use main category (Producto) for ads This is the right change!!!! --- 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 692b543..03b68be 100644 --- a/lib/model/doctrine/CompanyCategoryTable.class.php +++ b/lib/model/doctrine/CompanyCategoryTable.class.php @@ -28,14 +28,14 @@ class CompanyCategoryTable extends Doctrine_Table if ($currentCategory != null) { return $this->createQuery('cc')->where('cc.level != ?', '0') - ->orWhere('cc.company_id = ?', $companyId) + ->andWhere('cc.company_id = ?', $companyId) ->andWhere('cc.lft > ? or cc.lft < ?', array($currentRgt, $currentLft)) ->orderBy('cc.lft'); } else { return $this->createQuery('cc')->where('cc.company_id = ?', $companyId) - ->orWhere('cc.level != ?', '0') + ->andWhere('cc.level != ?', '0') ->orderBy('cc.lft'); } } -- 2.1.4