Uers may not use main category (Producto) for ads
authorGusa <gu.martinm@gmail.com>
Sat, 15 Dec 2012 01:18:49 +0000 (02:18 +0100)
committerGusa <gu.martinm@gmail.com>
Sat, 15 Dec 2012 01:18:49 +0000 (02:18 +0100)
This is the right change!!!!

lib/model/doctrine/CompanyCategoryTable.class.php

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