ticket:15 댓글알리미에서 중복된 알림 무시

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4428 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2008-07-31 10:07:43 +00:00
parent ca4c3845ac
commit 5df264d01a
5 changed files with 53 additions and 7 deletions

View file

@ -1,4 +0,0 @@
2008.06.26 v0.2.0 본문에 대한 댓글알림 추가- 기본패키지에 추가
2008.06.18 v0.1.3 queue에서 잘 안 빠지는 문제 수정
2008.06.18 v0.1.2 page module로 들어오는 noti가 반영이 안되는 문제 수정
2008.06.17 v0.1.1 tag strip안되는 문제 수정

View file

@ -4,8 +4,8 @@
<title xml:lang="en">Comment Notifier</title>
<description xml:lang="ko">댓글알리미 모듈입니다.</description>
<description xml:lang="en">Comment Notifier will tell you when there's a new comment</description>
<version>0.2.0</version>
<date>2008-06-26</date>
<version>0.2.1</version>
<date>2008-07-31</date>
<category>accessory</category>
<link>http://www.zeroboard.com</link>
@ -14,6 +14,14 @@
<name xml:lang="en">haneul</name>
</author>
<history version="0.2.1" date="2008-07-31">
<author email_address="haneul0318@gmail.com" link="http://seungyeop.kr">
<name xml:lang="ko">haneul</name>
<name xml:lang="en">haneul</name>
</author>
<log>중복 댓글알림 제거 추가</log>
</history>
<history version="0.2.0" date="2008-06-26">
<author email_address="haneul0318@gmail.com" link="http://seungyeop.kr">
@ -47,4 +55,4 @@
</author>
<log>tag strip안되는 문제 수정</log>
</history>
</module>
</module>

View file

@ -0,0 +1,12 @@
<query id="geChildId" action="select">
<tables>
<table name="tcnotifiedchildren" />
</tables>
<columns>
<column name="notified_srl" alias="notified_srl"/>
</columns>
<conditions>
<condition operation="equal" column="parent_srl" var="parent_srl" notnull="notnull" />
<condition operation="equal" column="remoteid" var="remoteid" notnull="notnull" pipe="and" />
</conditions>
</query>

View file

@ -137,6 +137,11 @@
return executeQuery("tccommentnotify.insertQueue", $args);
}
function procTestSendComment()
{
$this->sendCommentNotify(16775);
}
function sendCommentNotify($comment_srl)
{
set_include_path("./libs/PEAR");
@ -318,6 +323,7 @@
}
$parentid = $oModel->GetParentID( $obj->s_no, $siteid, $module_srl, $obj->r1_no );
$commentid = -1;
if( $parentid == -2 )
{
$oDB->rollback();
@ -334,6 +340,12 @@
}
else
{
$commentid = $oModel->GetCommentID( $parentid, $obj->r2_no );
if($commentid != -1)
{
$oDB->rollback();
return;
}
$this->updateParent($parentid);
}

View file

@ -47,6 +47,24 @@
return $siteid;
}
function GetCommentID( $parent_srl, $remoteid )
{
$args->parent_srl = $parent_srl;
$args->remoteid = $remoteid;
$output = executeQuery('tccommentnotify.getChildId', $args);
if(!$output->data)
{
return -1;
}
$commentid = $output->data->notified_srl;
if( is_array($commentid) )
{
$commentid = array_shift($commentid);
}
return $commentid;
}
function GetParentID( $entry, $siteid, $module_srl, $remoteid )
{
$args->entry = $entry;