From: Gusa Date: Sat, 15 Dec 2012 00:58:54 +0000 (+0100) Subject: Users may not use main category (Producto) for ads X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=962a43b7316aabf1e0525ab586567718da976eec;p=mobi%2F.git Users may not use main category (Producto) for ads --- 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'); } }