]> git.mxchange.org Git - friendica.git/blobdiff - mod/nodeinfo.php
Merge remote-tracking branch 'upstream/develop' into 1702-only-worker
[friendica.git] / mod / nodeinfo.php
index e55dba128f961071a3705e9a1543846d01d5446f..6f204947579bfafd263019709422f62e1ef40add 100644 (file)
@@ -1,13 +1,13 @@
 <?php
 /**
  * @file mod/nodeinfo.php
- * 
+ *
  * Documentation: http://nodeinfo.diaspora.software/schema.html
 */
 
 require_once("include/plugin.php");
 
-function nodeinfo_wellknown(&$a) {
+function nodeinfo_wellknown(App $a) {
        if (!get_config("system", "nodeinfo")) {
                http_status_exit(404);
                killme();
@@ -20,7 +20,7 @@ function nodeinfo_wellknown(&$a) {
        exit;
 }
 
-function nodeinfo_init(&$a){
+function nodeinfo_init(App $a) {
        if (!get_config("system", "nodeinfo")) {
                http_status_exit(404);
                killme();
@@ -228,9 +228,10 @@ function nodeinfo_cron() {
 
         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))