Skip to content

Commit

Permalink
Merge pull request #25 from CleanTalk/version3.3
Browse files Browse the repository at this point in the history
Version3 3
  • Loading branch information
VladCleantalk committed Sep 11, 2015
2 parents e1b50fd + da55603 commit 02ad34e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
15 changes: 9 additions & 6 deletions antispambycleantalk.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* CleanTalk joomla plugin
*
* @version 3.3
* @version 3.4
* @package Cleantalk
* @subpackage Joomla
* @author CleanTalk (welcome@cleantalk.org)
Expand All @@ -22,7 +22,7 @@ class plgSystemAntispambycleantalk extends JPlugin {
/**
* Plugin version string for server
*/
const ENGINE = 'joomla-33';
const ENGINE = 'joomla-34';

/**
* Default value for hidden field ct_checkjs
Expand Down Expand Up @@ -324,7 +324,10 @@ public function onAfterInitialise()
//print_r($_POST);
//die();

if(isset($_GET['option'])&&$_GET['option']=='com_rsform'&&isset($_POST)&&sizeof($_POST)>0&&!$app->isAdmin() || isset($_POST['option'])&&$_POST['option']=='com_virtuemart'&&isset($_POST['task'])&&$_POST['task']=='saveUser')
if(isset($_GET['option'])&&$_GET['option']=='com_rsform'&&isset($_POST)&&sizeof($_POST)>0&&!$app->isAdmin() ||
isset($_POST['option'])&&$_POST['option']=='com_virtuemart'&&isset($_POST['task'])&&$_POST['task']=='saveUser' ||
isset($_GET['api_controller'])
)
{
$sender_email = '';
$sender_nickname = '';
Expand Down Expand Up @@ -1477,23 +1480,23 @@ private function getCTConfig() {
$config['general_contact_forms_test'] = '';
$config['relevance_test'] = '';
$config['user_token'] = '';
if (class_exists('JParameter')) { //1.5
/*if (class_exists('JParameter')) { //1.5
$jparam = new JParameter($plugin->params);
$config['apikey'] = $jparam->def('apikey', '');
$config['server'] = $jparam->def('server', '');
$config['jcomments_unpublished_nofications'] = $jparam->def('jcomments_unpublished_nofications', '');
$config['general_contact_forms_test'] = $jparam->def('general_contact_forms_test', '');
$config['relevance_test'] = $jparam->def('relevance_test', '');
$config['user_token'] = $jparam->def('user_token', '');
} else { //1.6+
} else { //1.6+*/
$jreg = new JRegistry($plugin->params);
$config['apikey'] = $jreg->get('apikey', '');
$config['server'] = $jreg->get('server', '');
$config['jcomments_unpublished_nofications'] = $jreg->get('jcomments_unpublished_nofications', '');
$config['general_contact_forms_test'] = $jreg->get('general_contact_forms_test', '');
$config['relevance_test'] = $jreg->get('relevance_test', '');
$config['user_token'] = $jreg->get('user_token', '');
}
//}

return $config;
}
Expand Down
4 changes: 2 additions & 2 deletions antispambycleantalk.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<extension version="2.5" type="plugin" group="system" method="upgrade" >
<name>Antispam by CleanTalk</name>
<author>CleanTalk team</author>
<creationDate>09.06.2015</creationDate>
<creationDate>26.08.2015</creationDate>
<copyright>(C) CleanTalk</copyright>
<license>GNU/GPLv2</license>
<authorEmail>welcome@cleantalk.org</authorEmail>
<authorUrl>cleantalk.org</authorUrl>
<version>3.3</version>
<version>3.4</version>
<description>PLG_CLEANTALK_DESCRIPTION</description>
<files>
<filename plugin="antispambycleantalk">antispambycleantalk.php</filename>
Expand Down

0 comments on commit 02ad34e

Please sign in to comment.