示例#1
0
 public function comment_vote_down()
 {
     // Get the application object.
     $app = JFactory::getApplication();
     $comment_id = JRequest::getInt("comment_id");
     $userId = JFactory::getUser()->get('id');
     $votes_down_success = ideary::voteDown($comment_id, $userId);
     $votes_down_count = ideary::getVotesDown($comment_id);
     $votes_up_count = ideary::getVotesUp($comment_id);
     echo json_encode(array('success' => $votes_down_success, 'votes_up_count' => $votes_up_count, 'votes_down_count' => $votes_down_count));
     $app->close();
 }