mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Close Connection when there is no connection value.
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@13161 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
034a5c0288
commit
f70ce644ce
1410 changed files with 7188 additions and 53541 deletions
|
|
@ -164,6 +164,19 @@ class commentAdminController extends comment
|
|||
// call a trigger for calling "send mail to subscribers" (for moment just for forum)
|
||||
ModuleHandler::triggerCall("comment.procCommentAdminChangeStatus", "after", $comment_srl_list);
|
||||
}
|
||||
|
||||
// for message send - start
|
||||
$message_content = Context::get('message_content');
|
||||
if($message_content)
|
||||
{
|
||||
$message_content = nl2br($message_content);
|
||||
}
|
||||
|
||||
if($message_content)
|
||||
{
|
||||
$this->_sendMessageForComment($message_content, $comment_srl_list);
|
||||
}
|
||||
// for message send - end
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -208,34 +221,13 @@ class commentAdminController extends comment
|
|||
|
||||
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);
|
||||
}
|
||||
$this->_sendMessageForComment($message_content, $comment_srl_list);
|
||||
}
|
||||
// for message send - end
|
||||
// comment into trash
|
||||
if($isTrash == 'true')
|
||||
{
|
||||
$this->_moveCommentToTrash($comment_srl_list, $oCommentController, $oDB);
|
||||
$this->_moveCommentToTrash($comment_srl_list, $oCommentController, $oDB, $message_content);
|
||||
}
|
||||
|
||||
$deleted_count = 0;
|
||||
|
|
@ -281,11 +273,38 @@ class commentAdminController extends comment
|
|||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
private function _sendMessageForComment($message_content, $comment_srl_list)
|
||||
{
|
||||
$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;
|
||||
|
||||
$comment_count = count($comment_srl_list);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* comment move to trash
|
||||
* @return void|object
|
||||
*/
|
||||
function _moveCommentToTrash($commentSrlList, &$oCommentController, &$oDB)
|
||||
function _moveCommentToTrash($commentSrlList, &$oCommentController, &$oDB, $message_content = NULL)
|
||||
{
|
||||
require_once(_XE_PATH_ . 'modules/trash/model/TrashVO.php');
|
||||
|
||||
|
|
@ -303,6 +322,7 @@ class commentAdminController extends comment
|
|||
$oTrashVO->setTitle(trim(strip_tags($oComment->variables['content'])));
|
||||
$oTrashVO->setOriginModule('comment');
|
||||
$oTrashVO->setSerializedObject(serialize($oComment->variables));
|
||||
$oTrashVO->setDescription($message_content);
|
||||
|
||||
$output = $oTrashAdminController->insertTrash($oTrashVO);
|
||||
if(!$output->toBool())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue