diff --git a/CHANGELOG b/CHANGELOG index 3e6bd6e..35fd99b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +Version 2.31 Mar 04, 2020 +------------------------------ +- Setting "Check registration" added. +- Fix for ut8_decode function. + Version 2.30 Dec 24, 2019 ------------------------------ - Bug fixes and other minor improvements diff --git a/README.md b/README.md index 16d5808..ad7325c 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Build Status](https://travis-ci.org/CleanTalk/smf-antispam.svg)](https://travis-ci.org/CleanTalk/smf-antispam) -* **Version:** 2.30 +* **Version:** 2.31 * **License:** GNU General Public License * **Compatible with:** SMF 2.0 and up * **Languages:** English, Russian diff --git a/RoboFile.php b/RoboFile.php index f31e193..8ca2ef7 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -8,7 +8,7 @@ class RoboFile extends \Robo\Tasks { const PACKAGE = 'antispam_cleantalk_smf'; - const VERSION = '2.30'; + const VERSION = '2.31'; const SMF_VERSION = '2.0.14'; // for forumPrepare @@ -99,7 +99,7 @@ public function versionCheck() $errors[] = 'Not found version in CHANGELOG'; } $ctVersion = str_replace('.', '', $version); - if (!preg_match("#'smf-" . preg_quote($ctVersion) . "'\);#m", file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'cleantalkMod.php'))) { + if (!preg_match("#'smf-" . preg_quote($ctVersion) . "'\);#m", file_get_contents( __DIR__ . DIRECTORY_SEPARATOR . '/cleantalk/cleantalkMod.php' ))) { $errors[] = 'Not found CT_AGENT_VERSION in cleantalkMod.php'; } if (count($errors)) { diff --git a/attention.png b/cleantalk/attention.png similarity index 100% rename from attention.png rename to cleantalk/attention.png diff --git a/cleantalkMod.php b/cleantalk/cleantalkMod.php similarity index 99% rename from cleantalkMod.php rename to cleantalk/cleantalkMod.php index a11a3a0..465900a 100644 --- a/cleantalkMod.php +++ b/cleantalk/cleantalkMod.php @@ -15,17 +15,11 @@ die('Hacking attempt...'); } -require_once(dirname(__FILE__) . '/lib/autoloader.php'); - // Fixes for old PHP versions -require_once(dirname(__FILE__) . '/phpFix.php'); +require_once(dirname(__FILE__) . '/lib/phpFix.php'); -// Base classes -require_once(dirname(__FILE__) . '/Cleantalk.php'); -require_once(dirname(__FILE__) . '/CleantalkRequest.php'); -require_once(dirname(__FILE__) . '/CleantalkResponse.php'); -require_once(dirname(__FILE__) . '/CleantalkHelper.php'); -require_once(dirname(__FILE__) . '/CleantalkSFW.php'); +// Classes autoloader +require_once(dirname(__FILE__) . '/lib/autoloader.php'); // Common CleanTalk options define('CT_AGENT_VERSION', 'smf-231'); @@ -427,8 +421,8 @@ function cleantalk_check_register(&$regOptions, $theme_vars){ return; if ( - $regOptions['interface'] == 'admin' && // Skip admin - $modSettings['cleantalk_check_registrations'] // Skip if registrations check are disabled + $regOptions['interface'] == 'admin' || // Skip admin + ! $modSettings['cleantalk_check_registrations'] // Skip if registrations check are disabled ) return; diff --git a/cleantalkModAdmin.php b/cleantalk/cleantalkModAdmin.php similarity index 100% rename from cleantalkModAdmin.php rename to cleantalk/cleantalkModAdmin.php diff --git a/lib/error.html b/cleantalk/error.html similarity index 100% rename from lib/error.html rename to cleantalk/error.html diff --git a/lib/Cleantalk.php b/cleantalk/lib/Cleantalk.php similarity index 100% rename from lib/Cleantalk.php rename to cleantalk/lib/Cleantalk.php diff --git a/lib/CleantalkAP/Common/API.php b/cleantalk/lib/CleantalkAP/Common/API.php similarity index 100% rename from lib/CleantalkAP/Common/API.php rename to cleantalk/lib/CleantalkAP/Common/API.php diff --git a/lib/CleantalkAP/Common/Arr.php b/cleantalk/lib/CleantalkAP/Common/Arr.php similarity index 100% rename from lib/CleantalkAP/Common/Arr.php rename to cleantalk/lib/CleantalkAP/Common/Arr.php diff --git a/lib/CleantalkAP/Common/Cron.php b/cleantalk/lib/CleantalkAP/Common/Cron.php similarity index 100% rename from lib/CleantalkAP/Common/Cron.php rename to cleantalk/lib/CleantalkAP/Common/Cron.php diff --git a/lib/CleantalkAP/Common/DB.php b/cleantalk/lib/CleantalkAP/Common/DB.php similarity index 100% rename from lib/CleantalkAP/Common/DB.php rename to cleantalk/lib/CleantalkAP/Common/DB.php diff --git a/lib/CleantalkAP/Common/Err.php b/cleantalk/lib/CleantalkAP/Common/Err.php similarity index 100% rename from lib/CleantalkAP/Common/Err.php rename to cleantalk/lib/CleantalkAP/Common/Err.php diff --git a/lib/CleantalkAP/Common/File.php b/cleantalk/lib/CleantalkAP/Common/File.php similarity index 100% rename from lib/CleantalkAP/Common/File.php rename to cleantalk/lib/CleantalkAP/Common/File.php diff --git a/lib/CleantalkAP/Common/Helper.php b/cleantalk/lib/CleantalkAP/Common/Helper.php similarity index 100% rename from lib/CleantalkAP/Common/Helper.php rename to cleantalk/lib/CleantalkAP/Common/Helper.php diff --git a/lib/CleantalkAP/Common/State.php b/cleantalk/lib/CleantalkAP/Common/State.php similarity index 100% rename from lib/CleantalkAP/Common/State.php rename to cleantalk/lib/CleantalkAP/Common/State.php diff --git a/lib/CleantalkAP/SMF/API.php b/cleantalk/lib/CleantalkAP/SMF/API.php similarity index 100% rename from lib/CleantalkAP/SMF/API.php rename to cleantalk/lib/CleantalkAP/SMF/API.php diff --git a/lib/CleantalkAP/SMF/Cron.php b/cleantalk/lib/CleantalkAP/SMF/Cron.php similarity index 100% rename from lib/CleantalkAP/SMF/Cron.php rename to cleantalk/lib/CleantalkAP/SMF/Cron.php diff --git a/lib/CleantalkAP/SMF/Err.php b/cleantalk/lib/CleantalkAP/SMF/Err.php similarity index 100% rename from lib/CleantalkAP/SMF/Err.php rename to cleantalk/lib/CleantalkAP/SMF/Err.php diff --git a/lib/CleantalkAP/SMF/FireWall.php b/cleantalk/lib/CleantalkAP/SMF/FireWall.php similarity index 100% rename from lib/CleantalkAP/SMF/FireWall.php rename to cleantalk/lib/CleantalkAP/SMF/FireWall.php diff --git a/lib/CleantalkAP/SMF/Helper.php b/cleantalk/lib/CleantalkAP/SMF/Helper.php similarity index 100% rename from lib/CleantalkAP/SMF/Helper.php rename to cleantalk/lib/CleantalkAP/SMF/Helper.php diff --git a/lib/CleantalkAP/SMF/RemoteCalls.php b/cleantalk/lib/CleantalkAP/SMF/RemoteCalls.php similarity index 100% rename from lib/CleantalkAP/SMF/RemoteCalls.php rename to cleantalk/lib/CleantalkAP/SMF/RemoteCalls.php diff --git a/lib/CleantalkAP/SMF/State.php b/cleantalk/lib/CleantalkAP/SMF/State.php similarity index 100% rename from lib/CleantalkAP/SMF/State.php rename to cleantalk/lib/CleantalkAP/SMF/State.php diff --git a/lib/CleantalkAP/Templates/Singleton.php b/cleantalk/lib/CleantalkAP/Templates/Singleton.php similarity index 100% rename from lib/CleantalkAP/Templates/Singleton.php rename to cleantalk/lib/CleantalkAP/Templates/Singleton.php diff --git a/lib/CleantalkAP/Variables/Cookie.php b/cleantalk/lib/CleantalkAP/Variables/Cookie.php similarity index 100% rename from lib/CleantalkAP/Variables/Cookie.php rename to cleantalk/lib/CleantalkAP/Variables/Cookie.php diff --git a/lib/CleantalkAP/Variables/Get.php b/cleantalk/lib/CleantalkAP/Variables/Get.php similarity index 100% rename from lib/CleantalkAP/Variables/Get.php rename to cleantalk/lib/CleantalkAP/Variables/Get.php diff --git a/lib/CleantalkAP/Variables/Post.php b/cleantalk/lib/CleantalkAP/Variables/Post.php similarity index 100% rename from lib/CleantalkAP/Variables/Post.php rename to cleantalk/lib/CleantalkAP/Variables/Post.php diff --git a/lib/CleantalkAP/Variables/Request.php b/cleantalk/lib/CleantalkAP/Variables/Request.php similarity index 100% rename from lib/CleantalkAP/Variables/Request.php rename to cleantalk/lib/CleantalkAP/Variables/Request.php diff --git a/lib/CleantalkAP/Variables/Server.php b/cleantalk/lib/CleantalkAP/Variables/Server.php similarity index 100% rename from lib/CleantalkAP/Variables/Server.php rename to cleantalk/lib/CleantalkAP/Variables/Server.php diff --git a/lib/CleantalkAP/Variables/SuperGlobalVariables.php b/cleantalk/lib/CleantalkAP/Variables/SuperGlobalVariables.php similarity index 100% rename from lib/CleantalkAP/Variables/SuperGlobalVariables.php rename to cleantalk/lib/CleantalkAP/Variables/SuperGlobalVariables.php diff --git a/lib/CleantalkHelper.php b/cleantalk/lib/CleantalkHelper.php similarity index 100% rename from lib/CleantalkHelper.php rename to cleantalk/lib/CleantalkHelper.php diff --git a/lib/CleantalkRequest.php b/cleantalk/lib/CleantalkRequest.php similarity index 100% rename from lib/CleantalkRequest.php rename to cleantalk/lib/CleantalkRequest.php diff --git a/lib/CleantalkResponse.php b/cleantalk/lib/CleantalkResponse.php similarity index 100% rename from lib/CleantalkResponse.php rename to cleantalk/lib/CleantalkResponse.php diff --git a/lib/CleantalkSFW.php b/cleantalk/lib/CleantalkSFW.php similarity index 100% rename from lib/CleantalkSFW.php rename to cleantalk/lib/CleantalkSFW.php diff --git a/lib/autoloader.php b/cleantalk/lib/autoloader.php similarity index 100% rename from lib/autoloader.php rename to cleantalk/lib/autoloader.php diff --git a/lib/phpFix.php b/cleantalk/lib/phpFix.php similarity index 100% rename from lib/phpFix.php rename to cleantalk/lib/phpFix.php diff --git a/lib/sfw_die_page.html b/cleantalk/lib/sfw_die_page.html similarity index 100% rename from lib/sfw_die_page.html rename to cleantalk/lib/sfw_die_page.html diff --git a/install.php b/install.php index 8529f2a..36d1086 100644 --- a/install.php +++ b/install.php @@ -153,7 +153,7 @@ if (isset($modSettings['cleantalk_api_key']) && $modSettings['cleantalk_api_key'] != '' && isset($modSettings['cleantalk_sfw']) && $modSettings['cleantalk_sfw'] == 1) { if (!class_exists('CleantalkSFW')) - require_once(dirname(__FILE__) . '/lib/CleantalkSFW.php'); + require_once(dirname(__FILE__) . '/cleantalk/lib/CleantalkSFW.php'); $sfw = new CleantalkSFW; $sfw->sfw_update($modSettings['cleantalk_api_key']); unset($sfw); diff --git a/package-info.xml b/package-info.xml index 1ee1f14..945df30 100644 --- a/package-info.xml +++ b/package-info.xml @@ -8,18 +8,14 @@ readme.txt readme_russian.txt + + - Mod main file - Mod admin file - Base class - Extend for base class - Extend for base class - Helper functions - SFW class - Fix for old PHP versions - SFW die page - Cleantalk error template - attention picture + + + Copying extension files + + modification.xml languages/english.xml languages/english-utf8.xml @@ -27,7 +23,11 @@ languages/russian-utf8.xml languages/spanish_es.xml languages/spanish_es-utf8.xml + + install.php + + Please stand by while you are being redirected to this mod configuration settings. @@ -493,14 +493,21 @@ This upgrade for Antispam by Cleantalk from 2.29 to 2.31 version: - Setting "Check registration" added. + - Fix for ut8_decode function. Обновление Анти-спама от Cleantalk с версии 2.29 до 2.30: - Добавлена опция "Проверка регистраций" + - Исправления для функции ut8_decode. + + + - Mod main file - Mod admin file - Fix for old PHP versions + + + Copying extension files + + modification.xml languages/english.xml languages/english-utf8.xml @@ -508,7 +515,10 @@ languages/russian-utf8.xml languages/spanish_es.xml languages/spanish_es-utf8.xml + + install.php + Please stand by while you are being redirected to this mod configuration settings.