www/adiumxtras.com 55:00fb0cf6347e: Email me with any errors tha...

commits at adium.im commits at adium.im
Fri Feb 27 08:40:00 UTC 2015


details:	http://hg.adium.im/www/adiumxtras.com/rev/00fb0cf6347e
revision:	55:00fb0cf6347e
branch:		adiumxtras.com
author:		Thijs Alkemade <me at thijsalkema.de>
date:		Fri Feb 27 09:39:50 2015 +0100

Email me with any errors that occur during Akismet testing.

diffs (19 lines):

diff -r 95a9b885f583 -r 00fb0cf6347e xtras.php
--- a/xtras.php	Fri Feb 27 09:26:13 2015 +0100
+++ b/xtras.php	Fri Feb 27 09:39:50 2015 +0100
@@ -87,9 +87,14 @@
 					
 					$akismet = new Akismet('http://www.adiumxtras.com/', AKISMET_API_KEY, $comment);
 				}
-						
+				
 				if($akismet && ($akismet->errorsExist() || !$akismet->isSpam())) {
 
+					if ($akismet->errorsExist()) {
+						$message = json_encode($akismet->errors);
+						mail("thijs at adium.im", "Error with Akismet on adiumxtras", $message, "From: xtras at adiumxtras.com");
+					}
+
 					$sql->query("INSERT INTO comments (xtra_id, parent_id, comment, user_id, posted) VALUES ('%d', '%d', '%s', '%d', NOW())", intval($_POST['xtra_id']), intval($_POST['parent_id']), strip_tags($_POST['comment']), currentUID());
 					$newCommentID = $sql->insert_id();
 				




More information about the commits mailing list