Ejemplo n.º 1
0
 public function indexAction()
 {
     $profileService = new Service_Profile();
     $storyService = new Service_Userstory();
     $friendService = new Service_Friend();
     $userList = $friendService->fetchFriendIds($this->_user->id);
     $this->_helper->layout->setLayout('topmenu');
     $this->view->profile = $profileService->fetchProfile($this->_user->id);
 }
Ejemplo n.º 2
0
 public function loadnewstoriesAction()
 {
     if ($this->getRequest()->isGet() && $this->_ajaxRequest) {
         $friendService = new Service_Friend();
         $storyService = new Service_Userstory();
         $friendList = $friendService->fetchFriendIds($this->_user->id);
         if (is_array($stories = $storyService->fetchByUsersAndTime($this->_user->storyNotificationPeriod, $friendList))) {
             $results['root'] = $stories;
             $this->_response->appendBody(Zend_Json::encode($results));
             return;
         } else {
             $this->_response->appendBody('0');
             return;
         }
     } else {
         return $this->_redirect('/notifications');
     }
 }