svn: /pear/packages/Bugtracker/trunk/include/ akismet.php

From: Date: Tue, 02 Mar 2010 01:57:00 +0000
Subject: svn: /pear/packages/Bugtracker/trunk/include/ akismet.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-9235@lists.php.net to get a copy of this message
rasmus Tue, 02 Mar 2010 01:57:00 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=295714 Log: Make it is_spam() compatible Changed paths: U pear/packages/Bugtracker/trunk/include/akismet.php Modified: pear/packages/Bugtracker/trunk/include/akismet.php =================================================================== --- pear/packages/Bugtracker/trunk/include/akismet.php 2010-03-02 01:52:25 UTC (rev 295713) +++ pear/packages/Bugtracker/trunk/include/akismet.php 2010-03-02 01:57:00 UTC (rev 295714) @@ -7,7 +7,7 @@ include 'Services/Akismet2.php'; -function akismet($author,$authorEmail,$authorUri,$content) { +function akismet($content, $author=null, $authorEmail=null, $authorUri=null) { static $apiKey = getenv('AKISMET_KEY'); $comment = new Services_Akismet2_Comment(array( @@ -24,11 +24,11 @@ $isSpam = true; } } catch (Services_Akismet2_InvalidApiKeyException $keyException) { - echo 'Invalid API key!'; + // echo 'Invalid API key!'; } catch (Services_Akismet2_HttpException $httpException) { - echo 'Error communicating with Akismet API server: ' . $httpException->getMessage(); + // echo 'Error communicating with Akismet API server: ' . $httpException->getMessage(); } catch (Services_Akismet2_InvalidCommentException $commentException) { - echo 'Specified comment is missing one or more required fields.' . $commentException->getMessage(); + // echo 'Specified comment is missing one or more required fields.' . $commentException->getMessage(); } return $isSpam;

« previous php.pear.core (#9235) next »