本文整理汇总了PHP中Story::GetSpamCheckFormat方法的典型用法代码示例。如果您正苦于以下问题:PHP Story::GetSpamCheckFormat方法的具体用法?PHP Story::GetSpamCheckFormat怎么用?PHP Story::GetSpamCheckFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Story
的用法示例。
在下文中一共展示了Story::GetSpamCheckFormat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: savestory
/**
* Saves a story submission
*
* @param array $A Data for that submission
* @return string HTML redirect
*
*/
function savestory($A)
{
global $_CONF, $_TABLES, $_USER;
$retval = '';
$story = new Story();
$story->loadSubmission();
// pseudo-formatted story text for the spam check
$result = PLG_checkforSpam($story->GetSpamCheckFormat(), $_CONF['spamx']);
if ($result > 0) {
COM_updateSpeedlimit('submit');
COM_displayMessageAndAbort($result, 'spamx', 403, 'Forbidden');
}
COM_updateSpeedlimit('submit');
$result = $story->saveSubmission();
if ($result == STORY_NO_ACCESS_TOPIC) {
// user doesn't have access to this topic - bail
$retval = COM_refresh($_CONF['site_url'] . '/index.php');
} elseif ($result == STORY_SAVED || $result == STORY_SAVED_SUBMISSION) {
if (isset($_CONF['notification']) && in_array('story', $_CONF['notification'])) {
sendNotification($_TABLES['storysubmission'], $story);
}
if ($result == STORY_SAVED) {
$retval = COM_refresh(COM_buildUrl($_CONF['site_url'] . '/article.php?story=' . $story->getSid()));
} else {
$retval = COM_refresh($_CONF['site_url'] . '/index.php?msg=2');
}
}
return $retval;
}