public function setupCats() { $tmp = new ProdCat(); $this->cats = $tmp->findAll('1', '1'); usort($this->cats, "cmpItems"); $this->cats = array_values(array_filter($this->cats, "checkActive")); $this->setupProds(); }
public function setupCats() { $tmp = new ProdCat(); $this->cats = $tmp->findAll('1', '1'); usort($this->cats, "cmpItems"); if (!$this->isLoggedIn()) { $this->cats = array_values(array_filter($this->cats, "checkActive")); } $this->highestCatOrder = $this->cats[count($this->cats) - 1]->ord(); $this->setupProds(); }