mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 12:02:24 +09:00
Adding Comments Approval System - issue 1625
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10368 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
23957de302
commit
0748cccdad
6 changed files with 358 additions and 162 deletions
|
|
@ -2809,6 +2809,9 @@ Xin vui lòng kiểm tra lại thông tin Database.]]></value>
|
||||||
<value xml:lang="en"><![CDATA[Cannot find the Keyword.]]></value>
|
<value xml:lang="en"><![CDATA[Cannot find the Keyword.]]></value>
|
||||||
<value xml:lang="en"><![CDATA[搜尋不到關鍵字]]></value>
|
<value xml:lang="en"><![CDATA[搜尋不到關鍵字]]></value>
|
||||||
</item>
|
</item>
|
||||||
|
<item name="comment_to_be_approved">
|
||||||
|
<value xml:lang="en"><![CDATA[Your comment must be approved by admin before being published.]]></value>
|
||||||
|
</item>
|
||||||
<item name="success_registed">
|
<item name="success_registed">
|
||||||
<value xml:lang="ko"><![CDATA[등록했습니다.]]></value>
|
<value xml:lang="ko"><![CDATA[등록했습니다.]]></value>
|
||||||
<value xml:lang="en"><![CDATA[Registered successfully.]]></value>
|
<value xml:lang="en"><![CDATA[Registered successfully.]]></value>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,32 @@
|
||||||
function init() {
|
function init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Modify comment(s) status to piublish/unpublish if calling module is using Comment Approval System
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function procCommentAdminChangePublishedStatusChecked()
|
function procCommentAdminChangePublishedStatusChecked()
|
||||||
|
{ // Error display if none is selected
|
||||||
|
$cart = Context::get('cart');
|
||||||
|
if(!is_array($cart))
|
||||||
|
{
|
||||||
|
$comment_srl_list= explode('|@|', $cart);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$comment_srl_list = $cart;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->procCommentAdminChangeStatus();
|
||||||
|
|
||||||
|
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||||
|
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispCommentAdminList', 'search_keyword', '');
|
||||||
|
header('location:'.$returnUrl);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function procCommentAdminChangeStatus()
|
||||||
{
|
{
|
||||||
$will_publish = Context::get('will_publish');
|
$will_publish = Context::get('will_publish');
|
||||||
|
|
||||||
|
|
@ -31,49 +56,31 @@
|
||||||
{
|
{
|
||||||
$comment_srl_list = $cart;
|
$comment_srl_list = $cart;
|
||||||
}
|
}
|
||||||
$comment_count = count($comment_srl_list);
|
|
||||||
// begin transaction
|
|
||||||
|
|
||||||
// for message send - start
|
|
||||||
$message_content = Context::get('message_content');
|
|
||||||
if($message_content) $message_content = nl2br($message_content);
|
|
||||||
|
|
||||||
if($message_content) {
|
|
||||||
$oCommunicationController = &getController('communication');
|
|
||||||
$oCommentModel = &getModel('comment');
|
|
||||||
|
|
||||||
$logged_info = Context::get('logged_info');
|
|
||||||
|
|
||||||
$title = cut_str($message_content,10,'...');
|
|
||||||
$sender_member_srl = $logged_info->member_srl;
|
|
||||||
|
|
||||||
for($i=0;$i<$comment_count;$i++) {
|
|
||||||
$comment_srl = $comment_srl_list[$i];
|
|
||||||
$oComment = $oCommentModel->getComment($comment_srl, true);
|
|
||||||
|
|
||||||
if(!$oComment->get('member_srl') || $oComment->get('member_srl')==$sender_member_srl) continue;
|
|
||||||
|
|
||||||
$content = sprintf("<div>%s</div><hr /><div style=\"font-weight:bold\">%s</div>",$message_content, $oComment->getContentText(20));
|
|
||||||
|
|
||||||
$oCommunicationController->sendMessage($sender_member_srl, $oComment->get('member_srl'), $title, $content, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// for message send - end
|
|
||||||
|
|
||||||
$args->status = $will_publish;
|
$args->status = $will_publish;
|
||||||
$args->comment_srls_list = $comment_srl_list;
|
$args->comment_srls_list = $comment_srl_list;
|
||||||
$output = executeQuery('comment.updatePublishedStatus', $args);
|
$output = executeQuery('comment.updatePublishedStatus', $args);
|
||||||
if(!$output->toBool()) return $output;
|
if(!$output->toBool())
|
||||||
|
{
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
//update comment count for document
|
//update comment count for document
|
||||||
$updated_documents_arr = array();
|
$updated_documents_arr = array();
|
||||||
// create the controller object of the document
|
// create the controller object of the document
|
||||||
$oDocumentController = &getController('document');
|
$oDocumentController = &getController('document');
|
||||||
|
// create the model object of the document
|
||||||
|
$oDocumentModel = &getModel('document');
|
||||||
// create the comment model object
|
// create the comment model object
|
||||||
$oCommentModel = &getModel('comment');
|
$oCommentModel = &getModel('comment');
|
||||||
for($i=0;$i<$comment_count;$i++)
|
//get admin info
|
||||||
|
$logged_info = Context::get('logged_info');
|
||||||
|
//$oMemberModule = &getModel("member");
|
||||||
|
//$logged_info = $oMemberModule->getMemberInfoByMemberSrl($logged_member_srl);
|
||||||
|
$new_status = ($will_publish) ? "published" : "unpublished";
|
||||||
|
foreach($comment_srl_list as $comment_srl)
|
||||||
{
|
{
|
||||||
$comment_srl = $comment_srl_list[$i];
|
|
||||||
// check if comment already exists
|
// check if comment already exists
|
||||||
$comment = $oCommentModel->getComment($comment_srl);
|
$comment = $oCommentModel->getComment($comment_srl);
|
||||||
if($comment->comment_srl != $comment_srl) return new Object(-1, 'msg_invalid_request');
|
if($comment->comment_srl != $comment_srl) return new Object(-1, 'msg_invalid_request');
|
||||||
|
|
@ -85,14 +92,61 @@
|
||||||
$comment_count = $oCommentModel->getCommentCount($document_srl);
|
$comment_count = $oCommentModel->getCommentCount($document_srl);
|
||||||
// update comment count of the article posting
|
// update comment count of the article posting
|
||||||
$output = $oDocumentController->updateCommentCount($document_srl, $comment_count, null, false);
|
$output = $oDocumentController->updateCommentCount($document_srl, $comment_count, null, false);
|
||||||
|
|
||||||
|
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||||
|
$author_email=$oDocument->variables['email_address'];
|
||||||
|
|
||||||
|
$oModuleModel = &getModel("module");
|
||||||
|
$module_info = $oModuleModel->getModuleInfoByModuleSrl($comment->module_srl);
|
||||||
|
$already_sent = array();
|
||||||
|
|
||||||
|
// send email to comment's author, all admins and thread(document) subscribers - START
|
||||||
|
// -------------------------------------------------------
|
||||||
|
$oMail = new Mail();
|
||||||
|
$mail_title = "[XE - ".$module_info->mid."] comment(s) status changed to ".$new_status." on document: \"".$oDocument->getTitleText()."\"";
|
||||||
|
$oMail->setTitle($mail_title);
|
||||||
|
$mail_content = "
|
||||||
|
The comment #".$comment_srl." on document \"".$oDocument->getTitleText()."\" has been ".$new_status." by admin of <strong><i>". strtoupper($module_info->mid)."</i></strong> module.
|
||||||
|
<br />
|
||||||
|
<br />Comment content:
|
||||||
|
".$comment->content."
|
||||||
|
<br />
|
||||||
|
";
|
||||||
|
$oMail->setContent($mail_content);
|
||||||
|
$oMail->setSender($logged_info->user_name, $logged_info->email_address);
|
||||||
|
|
||||||
|
$document_author_email = $oDocument->variables['email_address'];
|
||||||
|
|
||||||
|
//mail to author of thread - START
|
||||||
|
if($document_author_email != $comment->email_address && $logged_info->email_address != $document_author_email) {
|
||||||
|
$oMail->setReceiptor($document_author_email, $document_author_email);
|
||||||
|
$oMail->send();
|
||||||
|
$already_sent[] = $document_author_email;
|
||||||
}
|
}
|
||||||
|
//mail to author of thread - STOP
|
||||||
|
|
||||||
|
//mail to all emails set for administrators - START
|
||||||
|
if($module_info->admin_mail)
|
||||||
|
{
|
||||||
|
$target_mail = explode(',',$module_info->admin_mail);
|
||||||
|
for($i=0;$i<count($target_mail);$i++) {
|
||||||
|
$email_address = trim($target_mail[$i]);
|
||||||
|
if(!$email_address) continue;
|
||||||
|
if($author_email != $email_address) {
|
||||||
|
$oMail->setReceiptor($email_address, $email_address);
|
||||||
|
$oMail->send();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//mail to all emails set for administrators - STOP
|
||||||
|
}
|
||||||
|
// ----------------------------------------------------------
|
||||||
|
// send email to comment's author, all admins and thread(document) subscribers - STOP
|
||||||
|
}
|
||||||
|
// call a trigger for calling "send mail to subscribers" (for moment just for forum)
|
||||||
|
ModuleHandler::triggerCall("comment.procCommentAdminChangeStatus","after",$comment_srl_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
|
||||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispCommentAdminList', 'search_keyword', '');
|
|
||||||
header('location:'.$returnUrl);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -106,14 +106,7 @@
|
||||||
function isModuleUsingPublishValidation($document_srl=null, $module_srl=null)
|
function isModuleUsingPublishValidation($document_srl=null, $module_srl=null)
|
||||||
{
|
{
|
||||||
$oModuleModel = &getModel('module');
|
$oModuleModel = &getModel('module');
|
||||||
if(!is_null($document_srl))
|
|
||||||
{
|
|
||||||
$module_info = $oModuleModel->getModuleInfoByDocumentSrl($document_srl);
|
|
||||||
}
|
|
||||||
if(!is_null($module_srl))
|
|
||||||
{
|
|
||||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||||
}
|
|
||||||
$module_part_config = $oModuleModel->getModulePartConfig('comment',$module_info->module_srl);
|
$module_part_config = $oModuleModel->getModulePartConfig('comment',$module_info->module_srl);
|
||||||
$use_validation = false;
|
$use_validation = false;
|
||||||
if (isset($module_part_config->use_comment_validation) && $module_part_config->use_comment_validation == "Y")
|
if (isset($module_part_config->use_comment_validation) && $module_part_config->use_comment_validation == "Y")
|
||||||
|
|
@ -130,7 +123,7 @@
|
||||||
|
|
||||||
// check if comment's module is using comment validation and set the publish status to 0 (false)
|
// check if comment's module is using comment validation and set the publish status to 0 (false)
|
||||||
// for inserting query, otherwhise default is 1 (true - means comment is published)
|
// for inserting query, otherwhise default is 1 (true - means comment is published)
|
||||||
$using_validation = $this->isModuleUsingPublishValidation($obj->document_srl);
|
$using_validation = $this->isModuleUsingPublishValidation($obj->module_srl);
|
||||||
if(Context::get('is_logged'))
|
if(Context::get('is_logged'))
|
||||||
{
|
{
|
||||||
$logged_info = Context::get('logged_info');
|
$logged_info = Context::get('logged_info');
|
||||||
|
|
@ -144,7 +137,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$using_validation || $is_admin)
|
if (!$using_validation)
|
||||||
|
{
|
||||||
|
$obj->status = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($is_admin)
|
||||||
{
|
{
|
||||||
$obj->status = 1;
|
$obj->status = 1;
|
||||||
}
|
}
|
||||||
|
|
@ -152,6 +151,7 @@
|
||||||
{
|
{
|
||||||
$obj->status = 0;
|
$obj->status = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$obj->__isupdate = false;
|
$obj->__isupdate = false;
|
||||||
// call a trigger (before)
|
// call a trigger (before)
|
||||||
|
|
@ -262,10 +262,17 @@
|
||||||
// create the controller object of the document
|
// create the controller object of the document
|
||||||
$oDocumentController = &getController('document');
|
$oDocumentController = &getController('document');
|
||||||
// Update the number of comments in the post
|
// Update the number of comments in the post
|
||||||
if (!$using_validation || $is_admin)
|
if (!$using_validation)
|
||||||
{
|
{
|
||||||
$output = $oDocumentController->updateCommentCount($document_srl, $comment_count, $obj->nick_name, true);
|
$output = $oDocumentController->updateCommentCount($document_srl, $comment_count, $obj->nick_name, true);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($is_admin)
|
||||||
|
{
|
||||||
|
$output = $oDocumentController->updateCommentCount($document_srl, $comment_count, $obj->nick_name, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
// grant autority of the comment
|
// grant autority of the comment
|
||||||
$this->addGrant($obj->comment_srl);
|
$this->addGrant($obj->comment_srl);
|
||||||
// call a trigger(after)
|
// call a trigger(after)
|
||||||
|
|
@ -292,6 +299,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->sendEmailToAdminAfterInsertComment($obj);
|
||||||
|
|
||||||
|
|
||||||
$output->add('comment_srl', $obj->comment_srl);
|
$output->add('comment_srl', $obj->comment_srl);
|
||||||
//remove from cache
|
//remove from cache
|
||||||
|
|
@ -304,6 +313,127 @@
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Send email to module's admins after a new comment was interted successfully
|
||||||
|
* if Comments Approval System is used
|
||||||
|
* @param type $obj
|
||||||
|
*/
|
||||||
|
function sendEmailToAdminAfterInsertComment($obj)
|
||||||
|
{
|
||||||
|
$using_validation = $this->isModuleUsingPublishValidation($obj->module_srl);
|
||||||
|
|
||||||
|
$oDocumentModel = &getModel('document');
|
||||||
|
$oDocument = $oDocumentModel->getDocument($obj->document_srl);
|
||||||
|
|
||||||
|
$oMemberModel = &getModel("member");
|
||||||
|
if (isset($obj->member_srl) && !is_null($obj->member_srl))
|
||||||
|
{
|
||||||
|
$member_info = $oMemberModel->getMemberInfoByMemberSrl($obj->member_srl);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$member_info->is_admin = "N";
|
||||||
|
$member_info->nick_name = $obj->nick_name;
|
||||||
|
$member_info->user_name = $obj->user_name;
|
||||||
|
$member_info->email_address = $obj->email_address;
|
||||||
|
}
|
||||||
|
|
||||||
|
$oCommentModel = &getModel("comment");
|
||||||
|
$nr_comments_not_approved = $oCommentModel->getCommentAllCount(null,false);
|
||||||
|
$oModuleModel = &getModel("module");
|
||||||
|
$module_info = $oModuleModel->getModuleInfoByDocumentSrl($obj->document_srl);
|
||||||
|
// If there is no problem to register comment then send an email to all admin were set in module admin panel
|
||||||
|
if($module_info->admin_mail && $member_info->is_admin != 'Y')
|
||||||
|
{
|
||||||
|
$oMail = new Mail();
|
||||||
|
$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);
|
||||||
|
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');
|
||||||
|
$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 />Comment:
|
||||||
|
<br />\"".$obj->content."\"
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
Approve it: <a href=\"".$url_approve."\">".$url_approve."</a>
|
||||||
|
<br />Trash it: <a href=\"".$url_trash."\">".$url_trash."</a>
|
||||||
|
<br />Currently ".$nr_comments_not_approved." comments on \"".Context::get('mid')."\" module are waiting for approval. Please visit the moderation panel:
|
||||||
|
<br /><a href=\"".getFullUrl('','module','admin','act','dispCommentAdminList','search_target','module','search_keyword',$obj->module_srl)."\">".getFullUrl('','module','admin','act','dispCommentAdminList','search_target','module','search_keyword',$obj->module_srl)."</a>
|
||||||
|
";
|
||||||
|
$oMail->setContent($mail_content);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mail_content = "
|
||||||
|
Author: ".$member_info->nick_name."
|
||||||
|
<br />Author e-mail: ".$member_info->email_address."
|
||||||
|
<br />Comment:
|
||||||
|
<br />\"".$obj->content."\"
|
||||||
|
";
|
||||||
|
$oMail->setContent($mail_content);
|
||||||
|
// get email of thread's author
|
||||||
|
$document_author_email = $oDocument->variables['email_address'];
|
||||||
|
//get admin info
|
||||||
|
$logged_info = Context::get('logged_info');
|
||||||
|
|
||||||
|
//mail to author of thread - START
|
||||||
|
if($document_author_email != $obj->email_address && $logged_info->email_address != $document_author_email) {
|
||||||
|
$oMail->setReceiptor($document_author_email, $document_author_email);
|
||||||
|
$oMail->send();
|
||||||
|
}
|
||||||
|
// mail to author of thread - STOP
|
||||||
|
}
|
||||||
|
|
||||||
|
// get all admins emails
|
||||||
|
$admins_emails = $module_info->admin_mail;
|
||||||
|
$target_mail = explode(',',$admins_emails);
|
||||||
|
|
||||||
|
// send email to all admins - START
|
||||||
|
for($i=0;$i<count($target_mail);$i++)
|
||||||
|
{
|
||||||
|
$email_address = trim($target_mail[$i]);
|
||||||
|
if(!$email_address) continue;
|
||||||
|
$oMail->setReceiptor($email_address, $email_address);
|
||||||
|
$oMail->send();
|
||||||
|
}
|
||||||
|
// send email to all admins - STOP
|
||||||
|
}
|
||||||
|
|
||||||
|
$comment_srl_list = array(0 => $obj->comment_srl);
|
||||||
|
// call a trigger for calling "send mail to subscribers" (for moment just for forum)
|
||||||
|
ModuleHandler::triggerCall("comment.sendEmailToAdminAfterInsertComment","after",$comment_srl_list);
|
||||||
|
|
||||||
|
/*
|
||||||
|
// send email to author - START
|
||||||
|
$oMail = new Mail();
|
||||||
|
$mail_title = "[XE - ".Context::get('mid')."] your comment on document: \"".$oDocument->getTitleText()."\" have to be approved";
|
||||||
|
$oMail->setTitle($mail_title);
|
||||||
|
//$mail_content = sprintf("From : <a href=\"%s?document_srl=%s&comment_srl=%s#comment_%d\">%s?document_srl=%s&comment_srl=%s#comment_%d</a><br/>\r\n%s ", getFullUrl(''),$comment->document_srl,$comment->comment_srl,$comment->comment_srl, getFullUrl(''),$comment->document_srl,$comment->comment_srl,$comment->comment_srl,$comment>content);
|
||||||
|
$mail_content = "
|
||||||
|
Your comment #".$obj->comment_srl." on document \"".$oDocument->getTitleText()."\" have to be approved by admin of <strong><i>". strtoupper($module_info->mid)."</i></strong> module before to be publish.
|
||||||
|
<br />
|
||||||
|
<br />Comment content:
|
||||||
|
".$obj->content."
|
||||||
|
<br />
|
||||||
|
";
|
||||||
|
$oMail->setContent($mail_content);
|
||||||
|
$oMail->setSender($obj->email_address, $obj->email_address);
|
||||||
|
$oMail->setReceiptor($obj->email_address, $obj->email_address);
|
||||||
|
$oMail->send();
|
||||||
|
// send email to author - START
|
||||||
|
*/
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief fix the comment
|
* @brief fix the comment
|
||||||
**/
|
**/
|
||||||
|
|
|
||||||
|
|
@ -144,9 +144,17 @@
|
||||||
function getCommentCount($document_srl) {
|
function getCommentCount($document_srl) {
|
||||||
$args->document_srl = $document_srl;
|
$args->document_srl = $document_srl;
|
||||||
|
|
||||||
|
// get the number of comments on the document module
|
||||||
|
$oDocumentModel = &getModel('document');
|
||||||
|
$columnList = array('document_srl', 'module_srl');
|
||||||
|
$oDocument = $oDocumentModel->getDocument($document_srl, false, true, $columnList);
|
||||||
|
// return if no doc exists.
|
||||||
|
if(!$oDocument->isExists()) return;
|
||||||
|
// get a list of comments
|
||||||
|
$module_srl = $oDocument->get('module_srl');
|
||||||
//check if module is using validation system
|
//check if module is using validation system
|
||||||
$oCommentController = &getController('comment');
|
$oCommentController = &getController('comment');
|
||||||
$using_validation = $oCommentController->isModuleUsingPublishValidation($document_srl);
|
$using_validation = $oCommentController->isModuleUsingPublishValidation($module_srl);
|
||||||
if($using_validation)
|
if($using_validation)
|
||||||
{
|
{
|
||||||
$args->status = 1;
|
$args->status = 1;
|
||||||
|
|
@ -180,7 +188,7 @@
|
||||||
{
|
{
|
||||||
// check if module is using comment validation system
|
// check if module is using comment validation system
|
||||||
$oCommentController = &getController("comment");
|
$oCommentController = &getController("comment");
|
||||||
$is_using_validation = $oCommentController->isModuleUsingPublishValidation(null,$module_srl);
|
$is_using_validation = $oCommentController->isModuleUsingPublishValidation($module_srl);
|
||||||
if($is_using_validation)
|
if($is_using_validation)
|
||||||
{
|
{
|
||||||
$args->status = 1;
|
$args->status = 1;
|
||||||
|
|
@ -247,7 +255,7 @@
|
||||||
{
|
{
|
||||||
// check if module is using comment validation system
|
// check if module is using comment validation system
|
||||||
$oCommentController = &getController("comment");
|
$oCommentController = &getController("comment");
|
||||||
$is_using_validation = $oCommentController->isModuleUsingPublishValidation(null,$obj->module_srl);
|
$is_using_validation = $oCommentController->isModuleUsingPublishValidation($obj->module_srl);
|
||||||
if($is_using_validation)
|
if($is_using_validation)
|
||||||
{
|
{
|
||||||
$args->status = 1;
|
$args->status = 1;
|
||||||
|
|
@ -316,7 +324,7 @@
|
||||||
|
|
||||||
//check if module is using validation system
|
//check if module is using validation system
|
||||||
$oCommentController = &getController('comment');
|
$oCommentController = &getController('comment');
|
||||||
$using_validation = $oCommentController->isModuleUsingPublishValidation($document_srl);
|
$using_validation = $oCommentController->isModuleUsingPublishValidation($module_srl);
|
||||||
if($using_validation)
|
if($using_validation)
|
||||||
{
|
{
|
||||||
$args->status = 1;
|
$args->status = 1;
|
||||||
|
|
@ -437,7 +445,7 @@
|
||||||
|
|
||||||
// check if module is using comment validation system
|
// check if module is using comment validation system
|
||||||
$oCommentController = &getController("comment");
|
$oCommentController = &getController("comment");
|
||||||
$is_using_validation = $oCommentController->isModuleUsingPublishValidation(null,$obj->module_srl);
|
$is_using_validation = $oCommentController->isModuleUsingPublishValidation($obj->module_srl);
|
||||||
if ($is_using_validation)
|
if ($is_using_validation)
|
||||||
{
|
{
|
||||||
$args->s_is_published = 1;
|
$args->s_is_published = 1;
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
<action name="getCommentVotedMemberList" type="model" standalone="true" />
|
<action name="getCommentVotedMemberList" type="model" standalone="true" />
|
||||||
<action name="procCommentInsertModuleConfig" type="controller" standalone="true" ruleset="insertCommentModuleConfig" />
|
<action name="procCommentInsertModuleConfig" type="controller" standalone="true" ruleset="insertCommentModuleConfig" />
|
||||||
<action name="procCommentAdminDeleteChecked" type="controller" standalone="true" ruleset="deleteChecked" />
|
<action name="procCommentAdminDeleteChecked" type="controller" standalone="true" ruleset="deleteChecked" />
|
||||||
|
<action name="procCommentAdminChangeStatus" type="controller" standalone="true"/>
|
||||||
<action name="procCommentAdminChangePublishedStatusChecked" type="controller" standalone="true" />
|
<action name="procCommentAdminChangePublishedStatusChecked" type="controller" standalone="true" />
|
||||||
<action name="isModuleUsingPublishValidation" type="controller" standalone="true" />
|
<action name="isModuleUsingPublishValidation" type="controller" standalone="true" />
|
||||||
<action name="procCommentAdminCancelDeclare" type="controller" standalone="true" />
|
<action name="procCommentAdminCancelDeclare" type="controller" standalone="true" />
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
||||||
<td class="nowr">{(zdate($val->regdate,"Y-m-d\nH:i:s"))}</td>
|
<td class="nowr">{(zdate($val->regdate,"Y-m-d\nH:i:s"))}</td>
|
||||||
<td class="nowr"><a href="{getUrl('search_target','ipaddress','search_keyword',$val->ipaddress)}">{$val->ipaddress}</a></td>
|
<td class="nowr"><a href="{getUrl('search_target','ipaddress','search_keyword',$val->ipaddress)}">{$val->ipaddress}</a></td>
|
||||||
<td class="nowr"><!--@if($val->isSecret())-->{$secret_name_list['Y']}<!--@else-->{$secret_name_list['N']}<!--@end--></td>
|
<td class="nowr"><!--@if($val->isSecret())-->{$secret_name_list['Y']}<!--@else-->{$secret_name_list['N']}<!--@end--></td>
|
||||||
<td><!--@if($val->status)-->{$lang->published_name_list['Y']}<!--@else-->{$lang->published_name_list['N']}<!--@end--></td>
|
<td class="nowr"><!--@if($val->status)-->{$lang->published_name_list['Y']}<!--@else-->{$lang->published_name_list['N']}<!--@end--></td>
|
||||||
<td><input type="checkbox" name="cart" value="{$val->comment_srl}" /></td>
|
<td><input type="checkbox" name="cart" value="{$val->comment_srl}" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue