aboutsummaryrefslogtreecommitdiffstats
path: root/mod/ping.php
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2012-02-20 11:44:58 -0800
committerfabrixxm <fabrix.xm@gmail.com>2012-02-20 11:44:58 -0800
commit2507d09682fda0806b4599e440fe8e32711072f8 (patch)
treea56e349b63f91539ffe32558948d734252102af4 /mod/ping.php
parent2fe479034cec335079d802eb70f41e4737858b2b (diff)
parentdd09c2d125a109de6089a2122faa4e9c2ecd8f5d (diff)
downloadvolse-hubzilla-2507d09682fda0806b4599e440fe8e32711072f8.tar.gz
volse-hubzilla-2507d09682fda0806b4599e440fe8e32711072f8.tar.bz2
volse-hubzilla-2507d09682fda0806b4599e440fe8e32711072f8.zip
Merge pull request #41 from fabrixxm/master
fix connection request in mod/ping
Diffstat (limited to 'mod/ping.php')
-rw-r--r--[-rwxr-xr-x]mod/ping.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/mod/ping.php b/mod/ping.php
index db68332bd..9c2e385d6 100755..100644
--- 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 "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>
<result>";
@@ -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;