From edac27c791046cabcfcd2d33fa9dc696f04e4269 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 20 Feb 2012 20:21:34 +0100 Subject: [PATCH 1/2] ping: return all introductions detail when there are more than one --- mod/ping.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) mode change 100755 => 100644 mod/ping.php diff --git a/mod/ping.php b/mod/ping.php old mode 100755 new mode 100644 index db68332bd0..9c2e385d66 --- a/mod/ping.php +++ b/mod/ping.php @@ -5,6 +5,7 @@ require_once("include/datetime.php"); function ping_init(&$a) { header("Content-type: text/xml"); + echo " "; @@ -90,22 +91,20 @@ function ping_init(&$a) { } - $intros1 = q("SELECT COUNT(`intro`.`id`) AS `total`, `intro`.`id`, `intro`.`datetime`, + $intros1 = q("SELECT `intro`.`id`, `intro`.`datetime`, `fcontact`.`name`, `fcontact`.`url`, `fcontact`.`photo` FROM `intro` LEFT JOIN `fcontact` ON `intro`.`fid` = `fcontact`.`id` WHERE `intro`.`uid` = %d AND `intro`.`blocked` = 0 AND `intro`.`ignore` = 0 AND `intro`.`fid`!=0", intval(local_user()) ); - $intros2 = q("SELECT COUNT(`intro`.`id`) AS `total`, `intro`.`id`, `intro`.`datetime`, + $intros2 = q("SELECT `intro`.`id`, `intro`.`datetime`, `contact`.`name`, `contact`.`url`, `contact`.`photo` FROM `intro` LEFT JOIN `contact` ON `intro`.`contact-id` = `contact`.`id` WHERE `intro`.`uid` = %d AND `intro`.`blocked` = 0 AND `intro`.`ignore` = 0 AND `intro`.`contact-id`!=0", intval(local_user()) ); - $intro = $intros1[0]['total'] + $intros2[0]['total']; - if ($intros1[0]['total']==0) $intros1=Array(); - if ($intros2[0]['total']==0) $intros2=Array(); + $intro = count($intros1) + count($intros2); $intros = $intros1+$intros2; From dd09c2d125a109de6089a2122faa4e9c2ecd8f5d Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 20 Feb 2012 20:39:19 +0100 Subject: [PATCH 2/2] use info() for successfull dfrn confirmation instead of notice() --- mod/dfrn_confirm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 mod/dfrn_confirm.php diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php old mode 100755 new mode 100644 index abacd9906c..5a24f00893 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -252,7 +252,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { $message = unxmlify($xml->message); // human readable text of what may have gone wrong. switch($status) { case 0: - notice( t("Confirmation completed successfully.") . EOL); + info( t("Confirmation completed successfully.") . EOL); if(strlen($message)) notice( t('Remote site reported: ') . $message . EOL); break;