Beispiel #1
0
 function prepare()
 {
     parent::prepare();
     if (!empty($_REQUEST['newcalendar'])) {
         $this->addCalendar($_REQUEST['newcalendar']);
     }
     if (!empty($_REQUEST['removecalendar'])) {
         $this->removeCalendar($_REQUEST['removecalendar']);
     }
     if (!empty($_REQUEST['switchcalendar'])) {
         $this->switchCalendar($_REQUEST['switchcalendar']);
     }
     return array_values($this->user->getCalendar());
 }
Beispiel #2
0
 function prepare()
 {
     parent::prepare();
     #$entries = $this->fdb->getOwnerEntries($this->user, 10);
     $as = new Data_ActivityStream($this->fdb, $this->user);
     if (count($this->parameters) === 0) {
         $as->prepareUser();
         return $as->getData();
     }
     if (count($this->parameters) > 0) {
         if ($this->parameters[0] === 'feed') {
             $feed = $this->parameters[1];
             $as->prepareFeed($feed);
             return $as->getData();
         }
     }
     throw new Exception('Invalid parameters: ' . var_export($this->parameters, TRUE));
 }
Beispiel #3
0
 function prepare()
 {
     parent::prepare();
     $as = new Data_EventStream($this->fdb, $this->user);
     // error_log('Accessing API_Events');
     if (count($this->parameters) === 0) {
         $as->prepareUser();
         $limit = null;
         if (isset($_REQUEST['limit'])) {
             $limit = $_REQUEST['limit'];
         }
         return $as->getData($limit);
     }
     if (count($this->parameters) > 0) {
         if ($this->parameters[0] === 'group') {
             $groupid = $this->parameters[1];
             $as->prepareGroup($groupid);
             return $as->getData();
         }
     }
     throw new Exception('Invalid parameters: ' . var_export($this->parameters, TRUE));
 }
Beispiel #4
0
 function __construct($config, $parameters)
 {
     parent::__construct($config, $parameters);
 }
Beispiel #5
0
 function prepare()
 {
     parent::prepare();
     $entries = $this->fdb->getOwnerEntries($this->user, 10);
     return $entries;
 }