/**
  * Render recent activities feed
  *
  * @param void
  * @return null
  */
 function rss()
 {
     if ($this->active_project->isNew()) {
         $this->httpError(HTTP_ERR_NOT_FOUND);
     }
     // if
     require_once ANGIE_PATH . '/classes/feed/init.php';
     $feed = new Feed(lang(':project project', array('project' => $this->active_project->getName())) . ' - ' . lang('Recent activities'), $this->active_project->getOverviewUrl());
     $feed->setDescription(lang('Recent ":project" activities', array('project' => $this->active_project->getName())));
     $activities = ActivityLogs::findProjectActivitiesByUser($this->active_project, $this->logged_user, 50);
     if (is_foreachable($activities)) {
         foreach ($activities as $activity) {
             $object = $activity->getObject();
             $activity_title = $activity_body = $activity->renderHead(null, true);
             $activity_title = strip_tags($activity_title);
             if ($activity->has_body && ($body = trim($activity->renderBody()))) {
                 $activity_body .= $body;
             }
             // if
             $item = new FeedItem($activity_title, $object->getViewUrl(), $activity_body, $activity->getCreatedOn());
             $item->setId(extend_url($object->getViewUrl(), array('guid' => $activity->getId())));
             $feed->addItem($item);
         }
         // foreach
     }
     // if
     print render_rss_feed($feed);
     die;
 }
 /**
  * Render recent activities feed
  *
  * @param void
  * @return null
  */
 function rss()
 {
     require_once ANGIE_PATH . '/classes/feed/init.php';
     $projects = Projects::findNamesByUser($this->logged_user);
     $feed = new Feed($this->owner_company->getName() . ' - ' . lang('Recent activities'), ROOT_URL);
     $feed->setDescription(lang('Recent activities in active projects'));
     $activities = ActivityLogs::findActiveProjectsActivitiesByUser($this->logged_user, 50);
     if (is_foreachable($activities)) {
         foreach ($activities as $activity) {
             $object = $activity->getObject();
             $activity_title = $activity_body = $activity->renderHead();
             $activity_title = strip_tags($activity_title);
             if ($activity->has_body && ($body = trim($activity->renderBody()))) {
                 $activity_body .= $body;
             }
             // if
             $item = new FeedItem($activity_title, $object->getViewUrl(), $activity_body, $activity->getCreatedOn());
             $item->setId(extend_url($object->getViewUrl(), array('guid' => $activity->getId())));
             $feed->addItem($item);
         }
         // foreach
     }
     // if
     print render_rss_feed($feed);
     die;
 }