Merge pull request #6 from xpressengine/develop

Develop
This commit is contained in:
izuzero 2014-05-28 03:54:38 +09:00
commit c6eafb94da
41 changed files with 207 additions and 120 deletions

View file

@ -307,7 +307,7 @@ class commentController extends comment
{
$obj->comment_srl = getNextSequence();
}
elseif(!checkUserSequence($obj->comment_srl))
elseif(!$is_admin && !$manual_inserted && !checkUserSequence($obj->comment_srl))
{
return new Object(-1, 'msg_not_permitted');
}
@ -530,18 +530,22 @@ class commentController extends comment
$oMail->setSender($obj->email_address, $obj->email_address);
$mail_title = "[XE - " . Context::get('mid') . "] A new comment was posted on document: \"" . $oDocument->getTitleText() . "\"";
$oMail->setTitle($mail_title);
$url_comment = getFullUrl('','document_srl',$obj->document_srl).'#comment_'.$obj->comment_srl;
if($using_validation)
{
$url_approve = getFullUrl('', 'module', 'comment', 'act', 'procCommentAdminChangePublishedStatusChecked', 'cart[]', $obj->comment_srl, 'will_publish', '1', 'search_target', 'is_published', 'search_keyword', 'N');
$url_trash = getFullUrl('', 'module', 'comment', 'act', 'procCommentAdminDeleteChecked', 'cart[]', $obj->comment_srl, 'search_target', 'is_trash', 'search_keyword', 'true');
$url_approve = getFullUrl('', 'module', 'admin', 'act', 'procCommentAdminChangePublishedStatusChecked', 'cart[]', $obj->comment_srl, 'will_publish', '1', 'search_target', 'is_published', 'search_keyword', 'N');
$url_trash = getFullUrl('', 'module', 'admin', 'act', 'procCommentAdminDeleteChecked', 'cart[]', $obj->comment_srl, 'search_target', 'is_trash', 'search_keyword', 'true');
$mail_content = "
A new comment on the document \"" . $oDocument->getTitleText() . "\" is waiting for your approval.
<br />
<br />
Author: " . $member_info->nick_name . "
<br />Author e-mail: " . $member_info->email_address . "
<br />From : <a href=\"" . $url_comment . "\">" . $url_comment . "</a>
<br />Comment:
<br />\"" . $obj->content . "\"
<br />Document:
<br />\"" . $oDocument->getContentText(). "\"
<br />
<br />
Approve it: <a href=\"" . $url_approve . "\">" . $url_approve . "</a>
@ -556,8 +560,11 @@ class commentController extends comment
$mail_content = "
Author: " . $member_info->nick_name . "
<br />Author e-mail: " . $member_info->email_address . "
<br />From : <a href=\"" . $url_comment . "\">" . $url_comment . "</a>
<br />Comment:
<br />\"" . $obj->content . "\"
<br />Document:
<br />\"" . $oDocument->getContentText(). "\"
";
$oMail->setContent($mail_content);
@ -1110,7 +1117,17 @@ class commentController extends comment
$_SESSION['voted_comment'][$comment_srl] = TRUE;
// Return the result
return new Object(0, $success_message);
$output = new Object(0, $success_message);
if($point > 0)
{
$output->add('voted_count', $obj->after_point);
}
else
{
$output->add('blamed_count', $obj->after_point);
}
return $output;
}
/**