<?php
/**
* @file mod/nodeinfo.php
- *
+ *
* Documentation: http://nodeinfo.diaspora.software/schema.html
*/
require_once("include/plugin.php");
-function nodeinfo_wellknown(App &$a) {
+function nodeinfo_wellknown(App $a) {
if (!get_config("system", "nodeinfo")) {
http_status_exit(404);
killme();
exit;
}
-function nodeinfo_init(App &$a){
+function nodeinfo_init(App $a) {
if (!get_config("system", "nodeinfo")) {
http_status_exit(404);
killme();
logger("local_posts: ".$local_posts, LOGGER_DEBUG);
- $posts = qu("SELECT COUNT(*) AS `local_comments` FROM `item`
- INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
- WHERE `contact`.`self` and `item`.`id` != `item`.`parent` AND `item`.`network` IN ('%s', '%s', '%s')",
+ $posts = qu("SELECT COUNT(*) FROM `contact`
+ INNER JOIN `item` ON `item`.`contact-id` = `contact`.`id` AND `item`.`uid` = `contact`.`uid` AND
+ `item`.`id` != `item`.`parent` AND `item`.`network` IN ('%s', '%s', '%s')
+ WHERE `contact`.`self`",
dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DIASPORA), dbesc(NETWORK_DFRN));
if (!is_array($posts))