Exemplo n.º 1
0
 private function follow($query, $data)
 {
     if (!OW::getUser()->isAuthenticated()) {
         return array('warning' => OW::getLanguage()->text('equestions', 'not_authed_follow_warning'));
     }
     $this->service->addFollow(OW::getUser()->getId(), $data['questionId']);
     $status = array('posts' => false, 'votes' => false, 'follows' => $this->service->findFollowsCount($data['questionId'], $data['userContext']));
     return array('relation' => array('call' => 'showUnfollow', 'status' => $status), 'status' => $status);
 }