Skip to content

Commit

Permalink
fixed bug with sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
VladCleantalk committed Dec 23, 2015
1 parent 0c52edc commit 58ae997
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions antispambycleantalk.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* CleanTalk joomla plugin
*
* @version 3.7
* @version 3.7ю1
* @package Cleantalk
* @subpackage Joomla
* @author CleanTalk ([email protected])
Expand All @@ -21,7 +21,7 @@ class plgSystemAntispambycleantalk extends JPlugin {
/**
* Plugin version string for server
*/
const ENGINE = 'joomla-370';
const ENGINE = 'joomla-371';

/**
* Default value for hidden field ct_checkjs
Expand Down Expand Up @@ -800,7 +800,7 @@ public function onAfterRoute() {
}
} else {
$session->set($this->form_load_label, time());
$session->set($this->current_page, JURI::current());
$session->set('cleantalk_current_page', JURI::current());
}

/*
Expand Down Expand Up @@ -1055,7 +1055,7 @@ public function onJCommentsCommentBeforeAdd(&$comment) {
}

$post_info['comment_type'] = 'jcomments_comment';
$post_info['post_url'] = $session->get($this->current_page);
$post_info['post_url'] = $session->get('cleantalk_current_page');
$post_info = json_encode($post_info);
if ($post_info === false) {
$post_info = '';
Expand Down Expand Up @@ -1818,7 +1818,7 @@ private function onSpamCheck($context='', $data){

// gets 'comment_type' from $data. If not se it will use 'event_message'
$post_info['comment_type'] = $obj->get('comment_type','event_message');
$post_info['post_url'] = $session->get($this->current_page);
$post_info['post_url'] = $session->get('cleantalk_current_page');
$post_info = json_encode($post_info);
if ($post_info === false) {
$post_info = '';
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 @@
<install version="1.5" type="plugin" group="system" method="upgrade">
<name>Antispam by CleanTalk</name>
<author>CleanTalk team</author>
<creationDate>11.12.2015</creationDate>
<creationDate>23.12.2015</creationDate>
<copyright>(C) CleanTalk</copyright>
<license>GNU/GPLv2</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>cleantalk.org</authorUrl>
<version>3.7</version>
<version>3.7.1</version>
<description>PLG_CLEANTALK_DESCRIPTION</description>
<files>
<filename plugin="antispambycleantalk">antispambycleantalk.php</filename>
Expand Down

0 comments on commit 58ae997

Please sign in to comment.