From: Gusa Date: Sat, 15 Dec 2012 01:18:49 +0000 (+0100) Subject: Uers may not use main category (Producto) for ads X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=c29ca5f7dbab0da148c9dc815db64324fd168472;p=mobi%2F.git Uers may not use main category (Producto) for ads This is the right change!!!! --- 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'); } }