Skip to content

Commit

Permalink
Upd: Version 2.31.
Browse files Browse the repository at this point in the history
  • Loading branch information
safronik committed Mar 27, 2020
1 parent ddcf51a commit 856e81e
Show file tree
Hide file tree
Showing 39 changed files with 38 additions and 29 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)) {
Expand Down
File renamed without changes
16 changes: 5 additions & 11 deletions cleantalkMod.php → cleantalk/cleantalkMod.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion install.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
38 changes: 24 additions & 14 deletions package-info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@
<install for="2.0 - 2.1.99">
<readme type="file" parsebbc="true">readme.txt</readme>
<readme type="file" parsebbc="true" lang="russian-utf8">readme_russian.txt</readme>

<!-- Create source dir -->
<create-dir name="cleantalk" destination="$sourcedir"/>
<require-file name="cleantalkMod.php" destination="$sourcedir/cleantalk">Mod main file</require-file>
<require-file name="cleantalkModAdmin.php" destination="$sourcedir/cleantalk">Mod admin file</require-file>
<require-file name="lib/Cleantalk.php" destination="$sourcedir/cleantalk">Base class</require-file>
<require-file name="lib/CleantalkRequest.php" destination="$sourcedir/cleantalk">Extend for base class</require-file>
<require-file name="lib/CleantalkResponse.php" destination="$sourcedir/cleantalk">Extend for base class</require-file>
<require-file name="lib/CleantalkHelper.php" destination="$sourcedir/cleantalk">Helper functions</require-file>
<require-file name="lib/CleantalkSFW.php" destination="$sourcedir/cleantalk">SFW class</require-file>
<require-file name="lib/phpFix.php" destination="$sourcedir/cleantalk">Fix for old PHP versions</require-file>
<require-file name="lib/sfw_die_page.html" destination="$sourcedir/cleantalk">SFW die page</require-file>
<require-file name="lib/error.html" destination="$sourcedir/cleantalk">Cleantalk error template</require-file>
<require-file name="attention.png" destination="$sourcedir/cleantalk">attention picture</require-file>

<!-- Copying new source files -->
<require-dir name="cleantalk" destination="$sourcedir">Copying extension files</require-dir>

<!-- Translations -->
<modification format="xml" type="file">modification.xml</modification>
<modification format="xml" type="file">languages/english.xml</modification>
<modification format="xml" type="file">languages/english-utf8.xml</modification>
<modification format="xml" type="file">languages/russian.xml</modification>
<modification format="xml" type="file">languages/russian-utf8.xml</modification>
<modification format="xml" type="file">languages/spanish_es.xml</modification>
<modification format="xml" type="file">languages/spanish_es-utf8.xml</modification>

<!-- Database updates -->
<database>install.php</database>

<!-- Redirect -->
<redirect url="$boardurl/index.php?action=admin;area=modsettings;sa=cleantalk" type="inline">Please stand by while
you are being redirected to this mod configuration settings.
</redirect>
Expand Down Expand Up @@ -493,22 +493,32 @@
<upgrade from="2.30">
<readme type="inline" parsebbc="true">This upgrade for Antispam by Cleantalk from 2.29 to 2.31 version:
- Setting "Check registration" added.
- Fix for ut8_decode function.
</readme>
<readme type="inline" parsebbc="true" lang="russian-utf8">Обновление Анти-спама от Cleantalk с версии 2.29 до 2.30:
- Добавлена опция "Проверка регистраций"
- Исправления для функции ut8_decode.
</readme>

<!-- Cleaning up old data -->
<remove-dir name="$sourcedir/cleantalk" />
<create-dir name="cleantalk" destination="$sourcedir"/>
<require-file name="cleantalkMod.php" destination="$sourcedir/cleantalk">Mod main file</require-file>
<require-file name="cleantalkModAdmin.php" destination="$sourcedir/cleantalk">Mod admin file</require-file>
<require-file name="lib/phpFix.php" destination="$sourcedir/cleantalk">Fix for old PHP versions</require-file>

<!-- Copying new source files -->
<require-dir name="cleantalk" destination="$sourcedir">Copying extension files</require-dir>

<!-- Translations -->
<modification format="xml" type="file">modification.xml</modification>
<modification format="xml" type="file">languages/english.xml</modification>
<modification format="xml" type="file">languages/english-utf8.xml</modification>
<modification format="xml" type="file">languages/russian.xml</modification>
<modification format="xml" type="file">languages/russian-utf8.xml</modification>
<modification format="xml" type="file">languages/spanish_es.xml</modification>
<modification format="xml" type="file">languages/spanish_es-utf8.xml</modification>

<!-- Database updates -->
<database>install.php</database>

<redirect url="$boardurl/index.php?action=admin;area=modsettings;sa=cleantalk" type="inline">Please stand by while
you are being redirected to this mod configuration settings.
</redirect>
Expand Down

0 comments on commit 856e81e

Please sign in to comment.