Skip to content
Permalink
Browse files

bayes 0.5.2: Fix dbPrefix constant error for PHP 7.2

  • Loading branch information...
onli committed Feb 18, 2019
1 parent c98c11b commit 066c874d27a5bd1991807fb55b706103748a92b0
@@ -1,3 +1,5 @@
0.5.2: Fix dbPrefix constant error for PHP 7.2

0.5.1: Fixed token generation for delete/approve comment.

0.5.0: Use tokens to classificate comments via E-Mail if the option is activated in your Blog
@@ -42,7 +42,7 @@ function introspect(&$propbag) {
$this->title = PLUGIN_EVENT_SPAMBLOCK_BAYES_NAME;
$propbag->add ( 'description', PLUGIN_EVENT_SPAMBLOCK_BAYES_DESC);
$propbag->add ( 'name', $this->title);
$propbag->add ( 'version', '0.5.1' );
$propbag->add ( 'version', '0.5.2' );
$propbag->add ( 'event_hooks', array ('frontend_saveComment' => true,
'backend_spamblock_comments_shown' => true,
'external_plugin' => true,
@@ -407,15 +407,15 @@ function learn($text, $group, $type) {
$new_value [$token] = $stored_values [$token] + $value;
if ($serendipity['dbType'] == 'mysql' || $serendipity['dbType'] == 'mysqli') {
$sql = "INSERT INTO
{$serendipity[dbPrefix]}spamblock_bayes
{$serendipity['dbPrefix']}spamblock_bayes
(token, $group, type)
VALUES('$token', $value, '$type')
ON DUPLICATE KEY
UPDATE
$group = $group + VALUES($group);";
} else {
$sql = "UPDATE
{$serendipity[dbPrefix]}spamblock_bayes
{$serendipity['dbPrefix']}spamblock_bayes
SET
$group = $group + $value
WHERE
@@ -425,15 +425,15 @@ function learn($text, $group, $type) {
$new_value [$token] = $value;
if ($serendipity['dbType'] == 'mysql' || $serendipity['dbType'] == 'mysqli') {
$sql = "INSERT INTO
{$serendipity[dbPrefix]}spamblock_bayes
{$serendipity['dbPrefix']}spamblock_bayes
(token, $group, type)
VALUES('$token', $value, '$type')
ON DUPLICATE KEY
UPDATE
$group = $group + VALUES($group);";
} else {
$sql = "INSERT INTO
{$serendipity[dbPrefix]}spamblock_bayes
{$serendipity['dbPrefix']}spamblock_bayes
(token, $group, type)
VALUES('$token', $value, '$type')";
}

0 comments on commit 066c874

Please sign in to comment.
You can’t perform that action at this time.