From 1ef9b232d50523f3dac49e225d560bb9da0eb9b4 Mon Sep 17 00:00:00 2001
From: Kelly Rauchenberger <fefferburbia@gmail.com>
Date: Thu, 21 Aug 2008 13:55:53 +0000
Subject: Update: Added VerID bounce to phpBB3 and Wordpress

Subversion is on its way as well, just it needs to be opened in NetBeans.
Refs #44
---
 update/plugin/wordpress/trunk/instadisc/instadisc.php | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

(limited to 'update/plugin/wordpress')

diff --git a/update/plugin/wordpress/trunk/instadisc/instadisc.php b/update/plugin/wordpress/trunk/instadisc/instadisc.php
index c1d82ad..a92c726 100644
--- a/update/plugin/wordpress/trunk/instadisc/instadisc.php
+++ b/update/plugin/wordpress/trunk/instadisc/instadisc.php
@@ -157,7 +157,13 @@ function sendPost($id)
 								new xmlrpcval($authorName, 'string'),
 								new xmlrpcval($url, 'string'),
 								new xmlrpcval(serialize(array()), 'string')));
-	$client->send($msg);
+	$resp = $client->send($msg);
+	$val = $resp->value()->scalarVal();
+
+	if ($val == 2)
+	{
+		sendPost($id);
+	}
 }
 
 add_action('comment_post','sendComment');
@@ -181,7 +187,13 @@ function sendComment($id)
 								new xmlrpcval($author, 'string'),
 								new xmlrpcval($url, 'string'),
 								new xmlrpcval(serialize(array()), 'string')));
-	$client->send($msg);
+	$resp = $client->send($msg);
+	$val = $resp->value()->scalarVal();
+
+	if ($val == 2)
+	{
+		sendComment($id);
+	}
 }
 
 ?>
-- 
cgit 1.4.1