예제 #1
0
 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();
 }
예제 #2
0
 public function TrackVisitedApartments($old_apids)
 {
     if ($this->hasParameter('id')) {
         (int) ($id = $this->getParameter('id'));
         $new_ids = ActivityTracking::SetCookie($old_apids, $id);
         return $new_ids;
     }
 }