mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 08:12:17 +09:00
스팸필터 애드온을 제거하고 스팸필터 모듈에서 직접 trigger로 글/댓글/스팸글에 대한 스팸필터링 제어. 엮인글 스팸필터링 기능 강화
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3216 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
0729e06b31
commit
cb1e31bf5e
9 changed files with 272 additions and 140 deletions
12
modules/trackback/queries/getRegistedTrackback.xml
Normal file
12
modules/trackback/queries/getRegistedTrackback.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="getRegistedTrackback" action="select">
|
||||
<tables>
|
||||
<table name="trackbacks" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="like_prefix" column="ipaddress" var="ipaddress" notnull="notnull" />
|
||||
<condition operation="more" column="regdate" var="regdate" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
12
modules/trackback/queries/getRegistedTrackbacks.xml
Normal file
12
modules/trackback/queries/getRegistedTrackbacks.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="getRegistedTrackbacks" action="select">
|
||||
<tables>
|
||||
<table name="trackbacks" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="like_prefix" column="ipaddress" var="ipaddress" notnull="notnull" />
|
||||
<condition operation="more" column="regdate" var="regdate" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -114,6 +114,15 @@
|
|||
}
|
||||
|
||||
function insertTrackback($obj, $manual_inserted = false) {
|
||||
// 엮인글 정리
|
||||
$obj = Context::convertEncoding($obj);
|
||||
if(!$obj->blog_name) $obj->blog_name = $obj->title;
|
||||
$obj->excerpt = strip_tags($obj->excerpt);
|
||||
|
||||
// trigger 호출 (before)
|
||||
$output = ModuleHandler::triggerCall('trackback.insertTrackback', 'before', $obj);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// GET으로 넘어온 document_srl을 참조, 없으면 오류~
|
||||
$document_srl = $obj->document_srl;
|
||||
|
||||
|
|
@ -129,10 +138,6 @@
|
|||
$obj->module_srl = $oDocument->get('module_srl');
|
||||
}
|
||||
|
||||
// 엮인글 정리
|
||||
$obj = Context::convertEncoding($obj);
|
||||
if(!$obj->blog_name) $obj->blog_name = $obj->title;
|
||||
$obj->excerpt = strip_tags($obj->excerpt);
|
||||
|
||||
// 엮인글를 입력
|
||||
$obj->trackback_srl = getNextSequence();
|
||||
|
|
@ -283,5 +288,20 @@
|
|||
|
||||
return new Object(0, 'msg_trackback_send_success');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 ipaddress의 특정 시간대 내의 엮인글을 모두 삭제
|
||||
**/
|
||||
function deleteTrackbackSender($time, $ipaddress) {
|
||||
$obj->regdate = date("YmdHis",time()-$time);
|
||||
$obj->ipaddress = $ipaddress;
|
||||
$output = executeQueryArray('trackback.getRegistedTrackbacks', $obj);
|
||||
if(!$output->data || !count($output->data)) return;
|
||||
|
||||
foreach($output->data as $trackback) {
|
||||
$trackback_srl = $trackback->trackback_srl;
|
||||
$this->deleteTrackback($trackback_srl, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -97,5 +97,15 @@
|
|||
}
|
||||
return $module_trackback_config;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 정해진 시간내에 전체 엮인글 등록수를 구함
|
||||
**/
|
||||
function getRegistedTrackback($time, $ipaddress) {
|
||||
$obj->regdate = date("YmdHis",time()-$time);
|
||||
$obj->ipaddress = $ipaddress;
|
||||
$output = executeQuery('trackback.getRegistedTrackback', $obj);
|
||||
return $output->data->count;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue