Skip to content

Commit

Permalink
Release 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
davydovct committed Apr 29, 2020
1 parent c8ddbfe commit ca4701e
Show file tree
Hide file tree
Showing 10 changed files with 799 additions and 29 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# vbulletin-antispam
## Version 2.2
## Version 2.3
Anti-spam hook for vBulletin 4.X.
16 changes: 9 additions & 7 deletions classes/cleantalk.api.cp1251.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ static function FormAddon($sType) {
}
static function cookies_set()
{
global $vbulletin;
global $vbulletin;

// Cookie names to validate
$cookie_test_value = array(
'cookies_names' => array(),
Expand Down Expand Up @@ -64,8 +65,9 @@ static function cookies_set()
* @return null|0|1;
*/
static function cookies_test()
{
global $vbulletin;
{
global $vbulletin;

if(isset($_COOKIE['apbct_cookies_test'])){

$cookie_test = json_decode(stripslashes($_COOKIE['apbct_cookies_test']), true);
Expand Down Expand Up @@ -157,7 +159,7 @@ static function CheckSpam(&$arEntity, $bSendEmail = FALSE) {
$ct_request->sender_email = isset($arEntity['sender_email']) ? $arEntity['sender_email'] : '';
$ct_request->sender_nickname = isset($arEntity['sender_nickname']) ? $arEntity['sender_nickname'] : '';
$ct_request->sender_ip = isset($arEntity['sender_ip']) ? $arEntity['sender_ip'] : $sender_ip;
$ct_request->agent = 'vbulletin-22';
$ct_request->agent = 'vbulletin-23';
$ct_request->js_on = $checkjs;
$ct_request->sender_info = $sender_info;
$ct_request->submit_time = isset($_COOKIE['apbct_timestamp']) ? time() - intval($_COOKIE['apbct_timestamp']) : 0;
Expand Down Expand Up @@ -319,8 +321,8 @@ private static function GetWorkServer() {
);
else
return array(
'work_url' => 'http://moderate.cleantalk.org',
'server_url' => 'http://moderate.cleantalk.org',
'work_url' => 'https://moderate.cleantalk.org',
'server_url' => 'https://moderate.cleantalk.org',
'server_ttl' => 0,
'server_changed' => 0,
);
Expand All @@ -329,7 +331,7 @@ private static function GetWorkServer() {
/**
* CleanTalk inner function - sets working server.
*/
private static function SetWorkServer($work_url = 'http://moderate.cleantalk.org', $server_url = 'http://moderate.cleantalk.org', $server_ttl = 0, $server_changed = 0) {
private static function SetWorkServer($work_url = 'https://moderate.cleantalk.org', $server_url = 'https://moderate.cleantalk.org', $server_ttl = 0, $server_changed = 0) {
global $vbulletin;
$result = $vbulletin->db->query_first('SELECT count(*) AS count FROM ' . TABLE_PREFIX . 'cleantalk_server');
$count = $result['count'];
Expand Down
14 changes: 8 additions & 6 deletions classes/cleantalk.api.cp1256.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ static function FormAddon($sType) {
}
static function cookies_set()
{
global $vbulletin;
global $vbulletin;

// Cookie names to validate
$cookie_test_value = array(
'cookies_names' => array(),
Expand Down Expand Up @@ -64,8 +65,9 @@ static function cookies_set()
* @return null|0|1;
*/
static function cookies_test()
{
{
global $vbulletin;

if(isset($_COOKIE['apbct_cookies_test'])){

$cookie_test = json_decode(stripslashes($_COOKIE['apbct_cookies_test']), true);
Expand Down Expand Up @@ -157,7 +159,7 @@ static function CheckSpam(&$arEntity, $bSendEmail = FALSE) {
$ct_request->sender_email = isset($arEntity['sender_email']) ? $arEntity['sender_email'] : '';
$ct_request->sender_nickname = isset($arEntity['sender_nickname']) ? $arEntity['sender_nickname'] : '';
$ct_request->sender_ip = isset($arEntity['sender_ip']) ? $arEntity['sender_ip'] : $sender_ip;
$ct_request->agent = 'vbulletin-22';
$ct_request->agent = 'vbulletin-23';
$ct_request->js_on = $checkjs;
$ct_request->sender_info = $sender_info;
$ct_request->submit_time = isset($_COOKIE['apbct_timestamp']) ? time() - intval($_COOKIE['apbct_timestamp']) : 0;
Expand Down Expand Up @@ -319,8 +321,8 @@ private static function GetWorkServer() {
);
else
return array(
'work_url' => 'http://moderate.cleantalk.org',
'server_url' => 'http://moderate.cleantalk.org',
'work_url' => 'https://moderate.cleantalk.org',
'server_url' => 'https://moderate.cleantalk.org',
'server_ttl' => 0,
'server_changed' => 0,
);
Expand All @@ -329,7 +331,7 @@ private static function GetWorkServer() {
/**
* CleanTalk inner function - sets working server.
*/
private static function SetWorkServer($work_url = 'http://moderate.cleantalk.org', $server_url = 'http://moderate.cleantalk.org', $server_ttl = 0, $server_changed = 0) {
private static function SetWorkServer($work_url = 'https://moderate.cleantalk.org', $server_url = 'https://moderate.cleantalk.org', $server_ttl = 0, $server_changed = 0) {
global $vbulletin;
$result = $vbulletin->db->query_first('SELECT count(*) AS count FROM ' . TABLE_PREFIX . 'cleantalk_server');
$count = $result['count'];
Expand Down
16 changes: 9 additions & 7 deletions classes/cleantalk.api.utf8.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ static function FormAddon($sType) {
}
static function cookies_set()
{
global $vbulletin;
global $vbulletin;

// Cookie names to validate
$cookie_test_value = array(
'cookies_names' => array(),
Expand Down Expand Up @@ -64,8 +65,9 @@ static function cookies_set()
* @return null|0|1;
*/
static function cookies_test()
{
global $vbulletin;
{
global $vbulletin;

if(isset($_COOKIE['apbct_cookies_test'])){

$cookie_test = json_decode(stripslashes($_COOKIE['apbct_cookies_test']), true);
Expand Down Expand Up @@ -157,7 +159,7 @@ static function CheckSpam(&$arEntity, $bSendEmail = FALSE) {
$ct_request->sender_email = isset($arEntity['sender_email']) ? $arEntity['sender_email'] : '';
$ct_request->sender_nickname = isset($arEntity['sender_nickname']) ? $arEntity['sender_nickname'] : '';
$ct_request->sender_ip = isset($arEntity['sender_ip']) ? $arEntity['sender_ip'] : $sender_ip;
$ct_request->agent = 'vbulletin-22';
$ct_request->agent = 'vbulletin-23';
$ct_request->js_on = $checkjs;
$ct_request->sender_info = $sender_info;
$ct_request->submit_time = isset($_COOKIE['apbct_timestamp']) ? time() - intval($_COOKIE['apbct_timestamp']) : 0;
Expand Down Expand Up @@ -319,8 +321,8 @@ private static function GetWorkServer() {
);
else
return array(
'work_url' => 'http://moderate.cleantalk.org',
'server_url' => 'http://moderate.cleantalk.org',
'work_url' => 'https://moderate.cleantalk.org',
'server_url' => 'https://moderate.cleantalk.org',
'server_ttl' => 0,
'server_changed' => 0,
);
Expand All @@ -329,7 +331,7 @@ private static function GetWorkServer() {
/**
* CleanTalk inner function - sets working server.
*/
private static function SetWorkServer($work_url = 'http://moderate.cleantalk.org', $server_url = 'http://moderate.cleantalk.org', $server_ttl = 0, $server_changed = 0) {
private static function SetWorkServer($work_url = 'https://moderate.cleantalk.org', $server_url = 'https://moderate.cleantalk.org', $server_ttl = 0, $server_changed = 0) {
global $vbulletin;
$result = $vbulletin->db->query_first('SELECT count(*) AS count FROM ' . TABLE_PREFIX . 'cleantalk_server');
$count = $result['count'];
Expand Down
4 changes: 2 additions & 2 deletions product-cleantalk-arabic-2.2-cp1256.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<product productid="cleantalk" active="1">
<title>ãä ãßÇÝÍÉ ÇáÈÑíÏ ÇáãÒÚÌ CleanTalk</title>
<description>ãßÇÝÍÉ ÇáÈÑíÏ ÇáÊØÝáí Ïæä captcha, ÃÓÆáÉ æÃÌæÈÉ, ÚÏ ÇáÍíæÇäÇÊ ÇáÃáÛÇÒ ÇáÍÓÇÈíÉ ÇáãÔÇßá</description>
<version>2.2</version>
<version>2.3</version>
<url>https://cleantalk.org/vbulletin</url>
<versioncheckurl />
<dependencies>
<dependency dependencytype="vbulletin" minversion="3.8.0" maxversion="4.2.9" />
</dependencies>
<codes>
<code version="2.2">
<code version="2.3">
<installcode><![CDATA[$db->show_errors();
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "ct_config");
Expand Down
4 changes: 2 additions & 2 deletions product-cleantalk-english-2.2-utf8.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<product productid="cleantalk" active="1">
<title>Anti-spam by CleanTalk</title>
<description>No Captcha, no questions, no counting animals, no puzzles, no math.</description>
<version>2.2</version>
<version>2.3</version>
<url>https://cleantalk.org/vbulletin</url>
<versioncheckurl />
<dependencies>
<dependency dependencytype="vbulletin" minversion="3.8.0" maxversion="4.2.9" />
</dependencies>
<codes>
<code version="2.2">
<code version="2.3">
<installcode><![CDATA[$db->show_errors();
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "ct_config");
Expand Down
4 changes: 2 additions & 2 deletions product-cleantalk-russian-2.2-cp1251.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<product productid="cleantalk" active="1">
<title>Àíòèñïàì îò CleanTalk</title>
<description>Àíòèñïàì áåç êàï÷è, âîïðîñîâ-îòâåòîâ, ïîäñ÷åòà æèâîòíûõ, ïàçëîâ è àðèôìåòè÷åñêèõ çàäà÷.</description>
<version>2.2</version>
<version>2.3</version>
<url>https://cleantalk.org/vbulletin</url>
<versioncheckurl />
<dependencies>
<dependency dependencytype="vbulletin" minversion="3.8.0" maxversion="4.2.9" />
</dependencies>
<codes>
<code version="2.2">
<code version="2.3">
<installcode><![CDATA[$db->show_errors();
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "ct_config");
Expand Down
4 changes: 2 additions & 2 deletions product-cleantalk-russian-2.2-utf8.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<product productid="cleantalk" active="1">
<title>Антиспам от CleanTalk</title>
<description>Антиспам без капчи, вопросов-ответов, подсчета животных, пазлов и арифметических задач.</description>
<version>2.2</version>
<version>2.3</version>
<url>https://cleantalk.org/vbulletin</url>
<versioncheckurl />
<dependencies>
<dependency dependencytype="vbulletin" minversion="3.8.0" maxversion="4.2.9" />
</dependencies>
<codes>
<code version="2.2">
<code version="2.3">
<installcode><![CDATA[$db->show_errors();
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "ct_config");
Expand Down
Loading

0 comments on commit ca4701e

Please sign in to comment.