spamBee: Made it work more nice with the contactform plugin

This commit is contained in:
Grischa Brockhaus 2012-09-26 12:51:21 +02:00
parent 5f69027d5d
commit be325e5338
3 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,6 @@
Version 1.2.7
* Made it work more nice with the contactform plugin
Version 1.2.6
* Fixed the plugin constrctor to make it compatible with the plugin api.

View file

@ -74,7 +74,6 @@ class serendipity_event_spamblock_bee extends serendipity_event
*/
var $useRegularExpressions = false;
/**
* Constructor. Initialize class variables from configuration
* @return void
@ -340,8 +339,13 @@ class serendipity_event_spamblock_bee extends serendipity_event
$this->printCommentEditExtras($eventData, $addData);
break;
case 'frontend_footer':
// Comment header code only if in single article mode
if (!empty($eventData['GET']['id'])) {
// Comment header code only if in single article mode or contactform
// If contact form is installed, display on any page not being the article list
// else display in single article only.
$contactFormInstalled = class_exists('serendipity_event_contactform');
if (($contactFormInstalled && empty($eventData['GET']['page']))
|| (!$contactFormInstalled && !empty($eventData['GET']['id'])))
{
$this->printJsExtras();
}
break;

View file

@ -1,2 +1,2 @@
<?php
@define('PLUGIN_SPAMBLOCK_BEE_VERSION', '1.2.6');
@define('PLUGIN_SPAMBLOCK_BEE_VERSION', '1.2.7');