Skip to content

Commit

Permalink
added upgrade check
Browse files Browse the repository at this point in the history
update version
  • Loading branch information
davydovct committed Aug 22, 2017
1 parent 8f1cdb0 commit 9e761c0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 62 deletions.
9 changes: 6 additions & 3 deletions CleanTalk/Base/CleanTalk.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ static public function getCheckjsName() {
ADD COLUMN `ct_check` VARCHAR(35) NULL AFTER `is_staff`;',
'SlashUserTable' => '
ALTER TABLE `xf_user`
DROP COLUMN `ct_check`;'
DROP COLUMN `ct_check`;',
'upgradeUserTable' =>'
SHOW COLUMNS FROM `xf_user` LIKE "ct_check";'
);

/* Insatll Hook */
public static function installHook(){
$db = XenForo_Application::get('db');
$db->query(self::$queries['extendUserTable']);
if (empty($db->fetchAll(self::$queries['upgradeUserTable'])))
$db->query(self::$queries['extendUserTable']);
}

/* Unnistall Hook */
Expand Down Expand Up @@ -306,7 +309,7 @@ public static function hookAdminSettings(XenForo_Visitor &$visitor ){

$ct_request = new CleantalkRequest();
$ct_request->auth_key = $_POST['options']['cleantalk']['apikey'];
$ct_request->feedback = '0:xenforo-22';
$ct_request->feedback = '0:xenforo-23';
$ct->sendFeedback($ct_request);
}
}
Expand Down
2 changes: 1 addition & 1 deletion CleanTalk/Model/CleanTalk.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ protected function _checkSpam($spam_check, $options) {

$ct_request = new CleantalkRequest();
$ct_request->auth_key = $ct_authkey;
$ct_request->agent = 'xenforo-22';
$ct_request->agent = 'xenforo-23';
$ct_request->response_lang = 'en';
$ct_request->js_on = $checkjs;
$ct_request->sender_info = $sender_info;
Expand Down
4 changes: 0 additions & 4 deletions CleanTalk/README.md

This file was deleted.

52 changes: 0 additions & 52 deletions CleanTalk/README.txt

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
xenforo-antispam
Version 2.2
================
Version 2.3
================

XenForo anti-spam addon.
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.2" version_id="22" 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.3" version_id="23" 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 9e761c0

Please sign in to comment.