Users may not use main category (Producto) for ads
authorGusa <gu.martinm@gmail.com>
Sat, 15 Dec 2012 00:58:54 +0000 (01:58 +0100)
committerGusa <gu.martinm@gmail.com>
Sat, 15 Dec 2012 00:58:54 +0000 (01:58 +0100)
lib/model/doctrine/CompanyCategoryTable.class.php

index 0d4bafc..692b543 100644 (file)
@@ -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');
         }
     }