コード例 #1
0
ファイル: Debug.php プロジェクト: ravikathaitarm01/fluenz1
 protected function _notifications()
 {
     $user = new User(null);
     $u = iterator_to_array($user->filter(array()));
     if ($id = $this->input->post('id')) {
         $notify = new Notify();
         $this->_display->view('debug/notification.php', array('users' => $u, 'selected' => $id, 'notifications' => $notify->get_all(new \MongoId($id))));
     } else {
         $this->_display->view('debug/notification.php', array('users' => $u, 'selected' => null, 'notifications' => array()));
     }
 }
コード例 #2
0
ファイル: Patch.php プロジェクト: ravikathaitarm01/fluenz1
 protected function _notify()
 {
     // Fix URLs b/w migrations & remove deleted users
     $notify = new Notify();
     foreach ($notify->all() as $n) {
         $u = null;
         $uinfo = (new \app\models\simple\User($n['sender']))->get();
         $u = $uinfo['type'];
         if ($u) {
             $notify->modify(array('_id' => $n['_id']), array('$set' => array('url' => Url::base($u))));
         } else {
             $notify->purge(array('_id' => $n['_id']));
         }
     }
 }
コード例 #3
0
ファイル: Send.php プロジェクト: ravikathaitarm01/fluenz1
 protected function _cleanup()
 {
     $notify = new Notify();
     $notify->mail_purge(array('$or' => array(array('sent' => true), array('tries' => self::MAX_TRIES))));
 }
コード例 #4
0
 protected function _view($id)
 {
     $notify = new Notify();
     $n = $notify->get(new \MongoId($id), true, UserSession::get('user._id'));
     Url::redirect(empty($n['url']) ? Url::referrer() : $n['url']);
 }