public function executeVisitedApartments(sfWebRequest $request) { $raw_apids = $this->getUser()->getAttribute('apids'); $new_apids = $request->TrackVisitedApartments($raw_apids); $this->getUser()->setAttribute('apids', $new_apids); $query = Doctrine::getTable('apartment')->createQuery()->whereIn('id', ActivityTracking::getCleanApids($new_apids)); $this->apartments = $query->execute(); }
public function TrackVisitedApartments($old_apids) { if ($this->hasParameter('id')) { (int) ($id = $this->getParameter('id')); $new_ids = ActivityTracking::SetCookie($old_apids, $id); return $new_ids; } }