是没有,可以自己加个。
app\article\ajax.php
public function article_vote_action()
{
switch ($_POST['type'])
{
case 'article':
$item_info = $this->model('article')->get_article_info_by_id($_POST['item_id']);
break;
case 'comment':
$item_info = $this->model('article')->get_comment_by_id($_POST['item_id']);
break;
}
if (!$item_info)
{
H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('内容不存在')));
}
if ($item_info['uid'] == $this->user_id)
{
H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('不能对自己发表的内容进行投票')));
}
$reputation_factor = $this->model('account')->get_user_group_by_id($this->user_info['reputation_group'], 'reputation_factor');
$this->model('article')->article_vote($_POST['type'], $_POST['item_id'], $_POST['rating'], $this->user_id, $reputation_factor, $item_info['uid']);
if ($_POST['type'] == 'article' AND $item_info['uid'] != $this->user_id)
{
$this->model('message')->send_message($this->user_id, $item_info['uid'], AWS_APP::lang()->_t('您发布的文章有人投票了,点击查看') . ': ' . get_setting('base_url') . '/article/' . intval($_POST['item_id']));
}
H::ajax_json_output(AWS_APP::RSM(null, 1, null));
}
阅读全文
收起全文