Skip to content

Commit

Permalink
Fixed notice "Undefined index: template_layers" when download attachment
Browse files Browse the repository at this point in the history
  • Loading branch information
psrustik committed Aug 31, 2015
1 parent 63c7254 commit 154b340
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Version 1.51 August 31, 2015
------------------------------
- Fixed notice "Undefined index: template_layers" when download attachment

Version 1.50 August 30, 2015
------------------------------
- Added SMF 2.1 Beta compatibility
Expand Down
4 changes: 3 additions & 1 deletion CleantalkMod.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
require_once(dirname(__FILE__) . '/cleantalk.class.php');

// define same CleanTalk options
define('CT_AGENT_VERSION', 'smf-150');
define('CT_AGENT_VERSION', 'smf-151');
define('CT_SERVER_URL', 'http://moderate.cleantalk.org');
define('CT_DEBUG', false);

Expand Down Expand Up @@ -315,6 +315,7 @@ function cleantalk_load()
{
global $context, $user_info;
if (
isset($context['template_layers']) &&
is_array($context['template_layers']) &&
in_array('body', $context['template_layers']) &&
($user_info['is_guest'] || $user_info['posts'] == 0) &&
Expand All @@ -331,6 +332,7 @@ function cleantalk_exit()
{
global $context, $user_info;
if (
isset($context['template_layers']) &&
is_array($context['template_layers']) &&
in_array('body', $context['template_layers']) &&
($user_info['is_guest'] || $user_info['posts'] == 0)
Expand Down
2 changes: 1 addition & 1 deletion RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class RoboFile extends \Robo\Tasks
{
const PACKAGE = 'antispam_cleantalk_smf';
const VERSION = '1.50';
const VERSION = '1.51';

/**
* Build SMF zip-package
Expand Down
7 changes: 6 additions & 1 deletion package-info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<id>cleantalk:antispam</id>
<name>Anti-spam by CleanTalk</name>
<version>1.50</version>
<version>1.51</version>
<type>modification</type>
<install for="2.0 - 2.1.99">
<readme type="file" parsebbc="true">readme.txt</readme>
Expand Down Expand Up @@ -77,4 +77,9 @@
<![CDATA[[size=14pt][color=red]Please uninstall old version cleantalk mod when installing newer version![/color][/size]]]>
</readme>
</upgrade>
<upgrade from="1.50">
<readme type="inline" parsebbc="true">
<![CDATA[[size=14pt][color=red]Please uninstall old version cleantalk mod when installing newer version![/color][/size]]]>
</readme>
</upgrade>
</package-info>
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MOD [b]Anti-spam by CleanTalk[/b]
Version: 1.50
Version: 1.51

Anti-spam by CleanTalk mod with protection against spam bots and manual spam.
No Captcha, no questions, no counting animals, no puzzles, no math.
Expand Down

0 comments on commit 154b340

Please sign in to comment.