X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fnodeinfo.php;h=e889d5a94ee1693b72027d15093cdd32c0b39b9d;hb=c22920edba4f80fee2d828a9fe265a9cb702e81c;hp=b0fcc09eda3f0006f67c73b2d609b7cbebf88f2d;hpb=06815f1a38409e45b0c5e5184c081f964ec89e47;p=friendica.git diff --git a/mod/nodeinfo.php b/mod/nodeinfo.php index b0fcc09eda..e889d5a94e 100644 --- a/mod/nodeinfo.php +++ b/mod/nodeinfo.php @@ -6,13 +6,14 @@ */ use Friendica\App; +use Friendica\Core\System; use Friendica\Core\Config; require_once 'include/plugin.php'; function nodeinfo_wellknown(App $a) { $nodeinfo = array('links' => array(array('rel' => 'http://nodeinfo.diaspora.software/ns/schema/1.0', - 'href' => App::get_baseurl().'/nodeinfo/1.0'))); + 'href' => System::baseUrl().'/nodeinfo/1.0'))); header('Content-type: application/json; charset=utf-8'); echo json_encode($nodeinfo, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES); @@ -187,7 +188,7 @@ function nodeinfo_cron() { } logger('cron_start'); - $users = qu("SELECT `user`.`uid`, `user`.`login_date`, `contact`.`last-item` + $users = q("SELECT `user`.`uid`, `user`.`login_date`, `contact`.`last-item` FROM `user` INNER JOIN `profile` ON `profile`.`uid` = `user`.`uid` AND `profile`.`is-default` INNER JOIN `contact` ON `contact`.`uid` = `user`.`uid` AND `contact`.`self` @@ -219,7 +220,7 @@ function nodeinfo_cron() { Config::set('nodeinfo', 'active_users_monthly', $active_users_monthly); } - $posts = qu("SELECT COUNT(*) AS local_posts FROM `thread` WHERE `thread`.`wall` AND `thread`.`uid` != 0"); + $posts = q("SELECT COUNT(*) AS local_posts FROM `thread` WHERE `thread`.`wall` AND `thread`.`uid` != 0"); if (!is_array($posts)) { $local_posts = -1; @@ -230,7 +231,7 @@ function nodeinfo_cron() { logger('local_posts: '.$local_posts, LOGGER_DEBUG); - $posts = qu("SELECT COUNT(*) FROM `contact` + $posts = q("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`",