18 $oModuleController->insertTrigger(
'document.insertDocument',
'spamfilter',
'controller',
'triggerInsertDocument',
'before');
19 $oModuleController->insertTrigger(
'comment.insertComment',
'spamfilter',
'controller',
'triggerInsertComment',
'before');
20 $oModuleController->insertTrigger(
'trackback.insertTrackback',
'spamfilter',
'controller',
'triggerInsertTrackback',
'before');
22 $oModuleController->insertTrigger(
'comment.updateComment',
'spamfilter',
'controller',
'triggerInsertComment',
'before');
23 $oModuleController->insertTrigger(
'document.updateDocument',
'spamfilter',
'controller',
'triggerInsertDocument',
'before');
25 $oModuleController->insertTrigger(
'communication.sendMessage',
'spamfilter',
'controller',
'triggerSendMessage',
'before');
38 $version_update_id = implode(
'.', array(__CLASS__,
__XE_VERSION__,
'updated'));
42 if(!
$oModuleModel->getTrigger(
'document.insertDocument',
'spamfilter',
'controller',
'triggerInsertDocument',
'before'))
return true;
43 if(!
$oModuleModel->getTrigger(
'comment.insertComment',
'spamfilter',
'controller',
'triggerInsertComment',
'before'))
return true;
44 if(!
$oModuleModel->getTrigger(
'trackback.insertTrackback',
'spamfilter',
'controller',
'triggerInsertTrackback',
'before'))
return true;
46 if(!
$oModuleModel->getTrigger(
'comment.updateComment',
'spamfilter',
'controller',
'triggerInsertComment',
'before'))
return true;
47 if(!
$oModuleModel->getTrigger(
'document.updateDocument',
'spamfilter',
'controller',
'triggerInsertDocument',
'before'))
return true;
49 if(!
$oModuleModel->getTrigger(
'communication.sendMessage',
'spamfilter',
'controller',
'triggerSendMessage',
'before'))
return true;
54 if(!$oDB->isColumnExists(
'spamfilter_denied_word',
'hit'))
return true;
55 if(!$oDB->isColumnExists(
'spamfilter_denied_word',
'latest_hit'))
return true;
57 if(!$oDB->isColumnExists(
'spamfilter_denied_ip',
'description'))
return true;
73 $version_update_id = implode(
'.', array(__CLASS__,
__XE_VERSION__,
'updated'));
77 if(!
$oModuleModel->getTrigger(
'document.insertDocument',
'spamfilter',
'controller',
'triggerInsertDocument',
'before'))
78 $oModuleController->insertTrigger(
'document.insertDocument',
'spamfilter',
'controller',
'triggerInsertDocument',
'before');
79 if(!
$oModuleModel->getTrigger(
'comment.insertComment',
'spamfilter',
'controller',
'triggerInsertComment',
'before'))
80 $oModuleController->insertTrigger(
'comment.insertComment',
'spamfilter',
'controller',
'triggerInsertComment',
'before');
81 if(!
$oModuleModel->getTrigger(
'trackback.insertTrackback',
'spamfilter',
'controller',
'triggerInsertTrackback',
'before'))
82 $oModuleController->insertTrigger(
'trackback.insertTrackback',
'spamfilter',
'controller',
'triggerInsertTrackback',
'before');
84 if(!
$oModuleModel->getTrigger(
'comment.updateComment',
'spamfilter',
'controller',
'triggerInsertComment',
'before'))
86 $oModuleController->insertTrigger(
'comment.updateComment',
'spamfilter',
'controller',
'triggerInsertComment',
'before');
89 if(!
$oModuleModel->getTrigger(
'document.updateDocument',
'spamfilter',
'controller',
'triggerInsertDocument',
'before'))
91 $oModuleController->insertTrigger(
'document.updateDocument',
'spamfilter',
'controller',
'triggerInsertDocument',
'before');
94 if(!
$oModuleModel->getTrigger(
'communication.sendMessage',
'spamfilter',
'controller',
'triggerSendMessage',
'before'))
96 $oModuleController->insertTrigger(
'communication.sendMessage',
'spamfilter',
'controller',
'triggerSendMessage',
'before');
102 if(!$oDB->isColumnExists(
'spamfilter_denied_word',
'hit'))
104 $oDB->addColumn(
'spamfilter_denied_word',
'hit',
'number',12,0,
true);
105 $oDB->addIndex(
'spamfilter_denied_word',
'idx_hit',
'hit');
107 if(!$oDB->isColumnExists(
'spamfilter_denied_word',
'latest_hit'))
109 $oDB->addColumn(
'spamfilter_denied_word',
'latest_hit',
'date');
110 $oDB->addIndex(
'spamfilter_denied_word',
'idx_latest_hit',
'latest_hit');
113 if(!$oDB->isColumnExists(
'spamfilter_denied_ip',
'description'))
115 $oDB->addColumn(
'spamfilter_denied_ip',
'description',
'varchar', 250);
getController($module_name)
recompileCache()
Re-generate the cache file.
The parent class of the spamfilter module.
getInstance($db_type=NULL)
moduleInstall()
Additional tasks required to accomplish during the installation.
moduleUpdate()
Execute update.
checkUpdate()
A method to check if the installation has been successful.