예제 #1
0
파일: Contact.php 프로젝트: Hywan/movim
 function ajaxEditContact($jid)
 {
     if (!$this->validateJid($jid)) {
         return;
     }
     $rd = new \Modl\RosterLinkDAO();
     $groups = $rd->getGroups();
     $rl = $rd->get($jid);
     $view = $this->tpl();
     if (isset($rl)) {
         $view->assign('submit', $this->call('ajaxEditSubmit', "movim_form_to_json('manage')"));
         $view->assign('contact', $rl);
         $view->assign('groups', $groups);
     }
     Dialog::fill($view->draw('_contact_edit', true));
 }
예제 #2
0
파일: Notifs.php 프로젝트: Nyco/movim
 function ajaxAccept($jid)
 {
     $jid = echapJid($jid);
     $rd = new \Modl\RosterLinkDAO();
     $c = $rd->get($jid);
     if (isset($c) && $c->groupname) {
         $ui = new UpdateItem();
         $ui->setTo($jid)->setFrom($this->user->getLogin())->setName($c->rostername)->setGroup($c->groupname)->request();
     } else {
         $r = new AddItem();
         $r->setTo($jid)->setFrom($this->user->getLogin())->request();
     }
     $p = new Subscribe();
     $p->setTo($jid)->request();
     $p = new Subscribed();
     $p->setTo($jid)->request();
     // TODO : move in Moxl
     $notifs = Cache::c('activenotifs');
     unset($notifs[$jid]);
     Cache::c('activenotifs', $notifs);
 }
예제 #3
0
파일: Notifs.php 프로젝트: Anon215/movim
 function ajaxAccept($jid)
 {
     $jid = echapJid($jid);
     $rd = new \Modl\RosterLinkDAO();
     $c = $rd->get($jid);
     if (isset($c) && $c->groupname) {
         $ui = new UpdateItem();
         $ui->setTo($jid)->setFrom($this->user->getLogin())->setName($c->rostername)->setGroup($c->groupname)->request();
     } else {
         $r = new AddItem();
         $r->setTo($jid)->setFrom($this->user->getLogin())->request();
     }
     $p = new Subscribe();
     $p->setTo($jid)->request();
     $p = new Subscribed();
     $p->setTo($jid)->request();
     // TODO : move in Moxl
     $session = \Session::start();
     $notifs = $session->get('activenotifs');
     unset($notifs[$jid]);
     $session->set('activenotifs', $notifs);
     Notification::ajaxClear('invite|' . $jid);
 }