diff --git a/serendipity_event_spamblock_bayes/ChangeLog b/serendipity_event_spamblock_bayes/ChangeLog index eb84e798..2b07a37e 100644 --- a/serendipity_event_spamblock_bayes/ChangeLog +++ b/serendipity_event_spamblock_bayes/ChangeLog @@ -1,3 +1,6 @@ +1.1.5: + * Update b8, to prevent a debug error when commenting + 1.1.4: * Hotfixes for PHP 8 (surrim) diff --git a/serendipity_event_spamblock_bayes/b8/b8.php b/serendipity_event_spamblock_bayes/b8/b8.php index d8f642ff..d1e46c45 100644 --- a/serendipity_event_spamblock_bayes/b8/b8.php +++ b/serendipity_event_spamblock_bayes/b8/b8.php @@ -1,30 +1,15 @@ +/* SPDX-FileCopyrightText: 2006-2021 Tobias Leupold + SPDX-FileCopyrightText: 2009 Oliver Lillie - b8 - A statistical ("Bayesian") spam filter written in PHP - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation in version 2.1 of the License. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + SPDX-License-Identifier: LGPL-3.0-or-later */ /** * The b8 spam filter library * - * @license LGPL 2.1 * @package b8 - * @author Tobias Leupold - * @author Oliver Lillie (original PHP 5 port) */ namespace b8; @@ -32,9 +17,9 @@ namespace b8; spl_autoload_register( function ($class) { $parts = explode('\\', $class); - if ($parts[1]) { + if (count($parts) > 2 && $parts[0] == 'b8') { require_once __DIR__ . DIRECTORY_SEPARATOR . $parts[1] - . DIRECTORY_SEPARATOR . $parts[2] . '.php'; + . DIRECTORY_SEPARATOR . $parts[2] . '.php'; } } ); diff --git a/serendipity_event_spamblock_bayes/serendipity_event_spamblock_bayes.php b/serendipity_event_spamblock_bayes/serendipity_event_spamblock_bayes.php index 3e57445d..4216de99 100644 --- a/serendipity_event_spamblock_bayes/serendipity_event_spamblock_bayes.php +++ b/serendipity_event_spamblock_bayes/serendipity_event_spamblock_bayes.php @@ -14,7 +14,7 @@ class serendipity_event_spamblock_bayes extends serendipity_event { $this->title = PLUGIN_EVENT_SPAMBLOCK_BAYES_NAME; $propbag->add ( 'description', PLUGIN_EVENT_SPAMBLOCK_BAYES_DESC); $propbag->add ( 'name', $this->title); - $propbag->add ( 'version', '1.1.4' ); + $propbag->add ( 'version', '1.1.5' ); $propbag->add ( 'event_hooks', array ('frontend_saveComment' => true, 'backend_comments_top' => true, 'external_plugin' => true,