]> git.mxchange.org Git - friendica.git/blobdiff - mod/nodeinfo.php
Merge remote-tracking branch 'upstream/develop' into develop
[friendica.git] / mod / nodeinfo.php
index 40094ee6e3a24047c572d479af1624a97adcd9ac..104fecb755ddc21ea1ad118ffaaeecc84b603700 100644 (file)
@@ -7,20 +7,20 @@
 
 require_once("include/plugin.php");
 
-function nodeinfo_wellknown(&$a) {
+function nodeinfo_wellknown(App &$a) {
        if (!get_config("system", "nodeinfo")) {
                http_status_exit(404);
                killme();
        }
        $nodeinfo = array("links" => array(array("rel" => "http://nodeinfo.diaspora.software/ns/schema/1.0",
-                                       "href" => $a->get_baseurl()."/nodeinfo/1.0")));
+                                       "href" => App::get_baseurl()."/nodeinfo/1.0")));
 
        header('Content-type: application/json; charset=utf-8');
        echo json_encode($nodeinfo, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);
        exit;
 }
 
-function nodeinfo_init(&$a){
+function nodeinfo_init(App &$a){
        if (!get_config("system", "nodeinfo")) {
                http_status_exit(404);
                killme();
@@ -217,10 +217,7 @@ function nodeinfo_cron() {
                        set_config('nodeinfo','active_users_monthly', $active_users_monthly);
        }
 
-       $posts = qu("SELECT COUNT(*) AS `local_posts` FROM `item`
-                       INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
-                       WHERE `contact`.`self` and `item`.`id` = `item`.`parent` AND left(body, 6) != '[share' AND `item`.`network` IN ('%s', '%s', '%s')",
-                       dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DIASPORA), dbesc(NETWORK_DFRN));
+       $posts = qu("SELECT COUNT(*) AS local_posts FROM `thread` WHERE `thread`.`wall` AND `thread`.`uid` != 0");
 
        if (!is_array($posts))
                $local_posts = -1;