mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-11 04:52:14 +09:00
대댓글일경우를 대비해서 로직 변경
This commit is contained in:
parent
f56b23e522
commit
5848572bb1
3 changed files with 48 additions and 7 deletions
|
|
@ -415,21 +415,33 @@ class ncenterliteController extends ncenterlite
|
||||||
return new Object();
|
return new Object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$notify_list = $oNcenterliteModel->getNotifyMemberSrlByCommentSrl($obj->comment_srl);
|
||||||
|
|
||||||
|
// 대댓글이 2개이상일경우 comment
|
||||||
|
$member_srls = array();
|
||||||
|
foreach($notify_list as $value)
|
||||||
|
{
|
||||||
|
if(!in_array($value->member_srl, $member_srls))
|
||||||
|
{
|
||||||
|
$member_srls[] = $value->member_srl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$args = new stdClass();
|
$args = new stdClass();
|
||||||
$args->srl = $obj->comment_srl;
|
$args->srl = $obj->comment_srl;
|
||||||
$output = executeQuery('ncenterlite.deleteNotifyBySrl', $args);
|
$output = executeQuery('ncenterlite.deleteNotifyBySrl', $args);
|
||||||
if($output->toBool())
|
if($output->toBool())
|
||||||
{
|
{
|
||||||
$oDocumentModel = getModel('document');
|
foreach($member_srls as $member_srl)
|
||||||
$oDocument = $oDocumentModel->getDocument($obj->document_srl);
|
{
|
||||||
|
|
||||||
//Remove flag files
|
//Remove flag files
|
||||||
$flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($oDocument->get('member_srl')) . $oDocument->get('member_srl') . '.php';
|
$flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($member_srl) . $member_srl . '.php';
|
||||||
if(file_exists($flag_path))
|
if(file_exists($flag_path))
|
||||||
{
|
{
|
||||||
FileHandler::removeFile($flag_path);
|
FileHandler::removeFile($flag_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return new Object();
|
return new Object();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -474,4 +474,21 @@ class ncenterliteModel extends ncenterlite
|
||||||
|
|
||||||
return $output->data;
|
return $output->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getNotifyMemberSrlByCommentSrl($comment_srl)
|
||||||
|
{
|
||||||
|
if(!$comment_srl === null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$args = new stdClass();
|
||||||
|
$args->srl = $comment_srl;
|
||||||
|
$output = executeQueryArray('ncenterlite.getNotifyMemberSrlByCommentSrl', $args);
|
||||||
|
if(!$output->toBool())
|
||||||
|
{
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $output->data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
<query id="getNotifyMemberSrlBySrl" action="select">
|
||||||
|
<tables>
|
||||||
|
<table name="ncenterlite_notify" />
|
||||||
|
</tables>
|
||||||
|
<columns>
|
||||||
|
<column name="member_srl" />
|
||||||
|
</columns>
|
||||||
|
<conditions>
|
||||||
|
<condition operation="equal" column="srl" var="srl" filter="number" notnull="notnull" />
|
||||||
|
<condition operation="equal" column="target_srl" var="srl" filter="number" notnull="notnull" pipe="or" />
|
||||||
|
</conditions>
|
||||||
|
</query>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue