Skip to content

Commit

Permalink
update version
Browse files Browse the repository at this point in the history
use built-in function for root dir
  • Loading branch information
davydovct committed Sep 5, 2018
1 parent ec3e410 commit 21c3b72
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
12 changes: 6 additions & 6 deletions CleanTalk/Base/CleanTalk.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
require_once $_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/Cleantalk.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/CleantalkHelper.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/CleantalkRequest.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/CleantalkRequest.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/CleantalkSFW.php';
require_once XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/Cleantalk.php';
require_once XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/CleantalkHelper.php';
require_once XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/CleantalkRequest.php';
require_once XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/CleantalkRequest.php';
require_once XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/CleantalkSFW.php';

class CleanTalk_Base_CleanTalk {

Expand Down Expand Up @@ -318,7 +318,7 @@ public static function hookAdminSettings(XenForo_Visitor &$visitor ){
!empty($_POST['options']['cleantalk']['apikey'])
)
{
CleantalkHelper::api_method_send_empty_feedback($_POST['options']['cleantalk']['apikey'], 'xenforo-25');
CleantalkHelper::api_method_send_empty_feedback($_POST['options']['cleantalk']['apikey'], 'xenforo-26');

if (isset($_POST['options']['cleantalk']['enabled_sfw']) && intval($_POST['options']['cleantalk']['enabled_sfw']) == 1)
{
Expand Down
4 changes: 2 additions & 2 deletions CleanTalk/Base/lib/Cleantalk.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
require_once $_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/CleantalkRequest.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/CleantalkResponse.php';
require_once XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/CleantalkRequest.php';
require_once XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/CleantalkResponse.php';

/**
* Cleantalk Base class
Expand Down
6 changes: 3 additions & 3 deletions CleanTalk/Base/lib/CleantalkSFW.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
require_once $_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/CleantalkHelper.php';
require_once XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/CleantalkHelper.php';

/*
* CleanTalk SpamFireWall base class
Expand Down Expand Up @@ -205,8 +205,8 @@ public function send_logs($ct_key){
public function sfw_die($api_key, $cookie_prefix = '', $cookie_domain = ''){

// File exists?
if(file_exists($_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/sfw_die_page.html')){
$sfw_die_page = file_get_contents($_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/sfw_die_page.html');
if(file_exists(XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/sfw_die_page.html')){
$sfw_die_page = file_get_contents(XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/sfw_die_page.html');
}else{
die("IP BLACKLISTED");
}
Expand Down
12 changes: 6 additions & 6 deletions CleanTalk/ControllerPublic/CleanTalkMisc.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
require_once $_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/Cleantalk.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/CleantalkHelper.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/CleantalkRequest.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/CleantalkRequest.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/CleantalkSFW.php';
require_once XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/Cleantalk.php';
require_once XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/CleantalkHelper.php';
require_once XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/CleantalkRequest.php';
require_once XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/CleantalkRequest.php';
require_once XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/CleantalkSFW.php';

class CleanTalk_ControllerPublic_CleanTalkMisc extends XFCP_CleanTalk_ControllerPublic_CleanTalkMisc {

Expand Down Expand Up @@ -117,7 +117,7 @@ public function actionContact() {

$ct_request = new CleantalkRequest();
$ct_request->auth_key = $ct_authkey;
$ct_request->agent = 'xenforo-25';
$ct_request->agent = 'xenforo-26';
$ct_request->response_lang = 'en';
$ct_request->js_on = $checkjs;
$ct_request->sender_info = $sender_info;
Expand Down
12 changes: 6 additions & 6 deletions CleanTalk/Model/CleanTalk.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
require_once $_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/Cleantalk.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/CleantalkHelper.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/CleantalkRequest.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/CleantalkRequest.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/library/CleanTalk/Base/lib/CleantalkSFW.php';
require_once XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/Cleantalk.php';
require_once XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/CleantalkHelper.php';
require_once XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/CleantalkRequest.php';
require_once XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/CleantalkRequest.php';
require_once XenForo_Application::getInstance()->getRootDir().'/library/CleanTalk/Base/lib/CleantalkSFW.php';

class CleanTalk_Model_CleanTalk extends XFCP_CleanTalk_Model_CleanTalk {

Expand Down Expand Up @@ -194,7 +194,7 @@ protected function _checkSpam($spam_check, $options) {

$ct_request = new CleantalkRequest();
$ct_request->auth_key = $ct_authkey;
$ct_request->agent = 'xenforo-25';
$ct_request->agent = 'xenforo-26';
$ct_request->response_lang = 'en';
$ct_request->js_on = $checkjs;
$ct_request->sender_info = $sender_info;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# xenforo-antispam
Xenforo anti-spam extension.
# Version 2.5
# Version 2.6

## How to install

Expand Down
2 changes: 1 addition & 1 deletion addon-CleanTalk.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<addon addon_id="CleanTalk" title="Antispam by CleanTalk" version_string="2.5" version_id="25" url="https://cleantalk.org" install_callback_class="CleanTalk_Base_CleanTalk" install_callback_method="installHook" uninstall_callback_class="CleanTalk_Base_CleanTalk" uninstall_callback_method="uninstallHook">
<addon addon_id="CleanTalk" title="Antispam by CleanTalk" version_string="2.6" version_id="26" url="https://cleantalk.org" install_callback_class="CleanTalk_Base_CleanTalk" install_callback_method="installHook" uninstall_callback_class="CleanTalk_Base_CleanTalk" uninstall_callback_method="uninstallHook">
<admin_navigation/>
<admin_permissions/>
<admin_style_properties/>
Expand Down

0 comments on commit 21c3b72

Please sign in to comment.