mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-30 15:52:17 +09:00
Don't throw fatal error if trackback module is not installed
This commit is contained in:
parent
0af94a2275
commit
278801ca01
2 changed files with 18 additions and 21 deletions
|
|
@ -141,9 +141,14 @@ class spamfilterModel extends spamfilter
|
|||
function isInsertedTrackback($document_srl)
|
||||
{
|
||||
$oTrackbackModel = getModel('trackback');
|
||||
$count = $oTrackbackModel->getTrackbackCountByIPAddress($document_srl, \RX_CLIENT_IP);
|
||||
if($count>0) return new Object(-1, 'msg_alert_trackback_denied');
|
||||
|
||||
if (is_object($oTrackbackModel) && method_exists($oTrackbackModel, 'getTrackbackCountByIPAddress'))
|
||||
{
|
||||
$count = $oTrackbackModel->getTrackbackCountByIPAddress($document_srl, \RX_CLIENT_IP);
|
||||
if ($count > 0)
|
||||
{
|
||||
return new Object(-1, 'msg_alert_trackback_denied');
|
||||
}
|
||||
}
|
||||
return new Object();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue