Beispiel #1
0
 public function setBookmark($item = false)
 {
     $arr = [];
     if ($item) {
         array_push($arr, $item);
     }
     $sd = new \Modl\SubscriptionDAO();
     $cd = new \Modl\ConferenceDAO();
     $session = Session::start();
     $subscribed = $sd->getSubscribed();
     if ($subscribed) {
         foreach ($subscribed as $s) {
             array_push($arr, ['type' => 'subscription', 'server' => $s->server, 'title' => $s->title, 'subid' => $s->subid, 'tags' => unserialize($s->tags), 'node' => $s->node]);
         }
     }
     $conferences = $cd->getAll();
     if ($conferences) {
         foreach ($conferences as $c) {
             array_push($arr, ['type' => 'conference', 'name' => $c->name, 'autojoin' => $c->autojoin, 'nick' => $c->nick, 'jid' => $c->conference]);
         }
     }
     $b = new Set();
     $b->setArr($arr)->setTo($session->get('jid'))->request();
 }
Beispiel #2
0
 public function setBookmark($item = false)
 {
     $arr = array();
     if ($item) {
         array_push($arr, $item);
     }
     $sd = new \modl\SubscriptionDAO();
     $cd = new \modl\ConferenceDAO();
     foreach ($sd->getSubscribed() as $s) {
         array_push($arr, array('type' => 'subscription', 'server' => $s->server, 'title' => $s->title, 'subid' => $s->subid, 'tags' => unserialize($s->tags), 'node' => $s->node));
     }
     foreach ($cd->getAll() as $c) {
         array_push($arr, array('type' => 'conference', 'name' => $c->name, 'autojoin' => $c->autojoin, 'nick' => $c->nick, 'jid' => $c->conference));
     }
     $b = new Set();
     $b->setArr($arr)->setTo($this->user->getLogin())->request();
 }