From 50d59f5ecd90716a8598ccc35601b1ac1ec71ab0 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 12 Jul 2020 10:41:29 +0200 Subject: [PATCH 1/2] Blockbot: There are still some more bots ... --- blockbot/blockbot.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blockbot/blockbot.php b/blockbot/blockbot.php index 8c1b7a8a..6bf70970 100644 --- a/blockbot/blockbot.php +++ b/blockbot/blockbot.php @@ -117,9 +117,9 @@ function blockbot_init_1(App $a) { 'Python-urllib/', 'Liferea/', 'aiohttp/', 'WordPress.com Reader', 'hackney/', 'Faraday v', 'okhttp', 'UniversalFeedParser', 'PixelFedBot', 'python-requests', 'WordPress/', 'http.rb/', 'Apache-HttpClient/', 'WordPress.com;', 'Pleroma', - 'Dispatch/', 'Ruby', 'Java/', 'libwww-perl/', 'Mastodon/', + 'Dispatch/', 'Ruby', 'Java/', 'libwww-perl/', 'Mastodon/', 'FeedlyApp/', 'lua-resty-http/', 'Tiny Tiny RSS/', 'Wget/', 'PostmanRuntime/', - 'W3C_Validator/', 'NetNewsWire', 'FeedValidator/']; + 'W3C_Validator/', 'NetNewsWire', 'FeedValidator/', 'theoldreader.com']; if (DI::config()->get('blockbot', 'good_crawlers')) { $agents = array_merge($agents, $good_agents); -- 2.43.0 From cae25f13c165c42e9820e561c964359a34aaf8d7 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 12 Jul 2020 12:49:55 +0000 Subject: [PATCH 2/2] Forumdirectory: Fix Notice "Undefined index: url in src/Module/Directory.php" --- forumdirectory/forumdirectory.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/forumdirectory/forumdirectory.php b/forumdirectory/forumdirectory.php index 5ade04cf..8c260fd7 100644 --- a/forumdirectory/forumdirectory.php +++ b/forumdirectory/forumdirectory.php @@ -15,6 +15,7 @@ use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Profile; +use Friendica\Model\User; use Friendica\Util\Strings; function forumdirectory_install() @@ -93,8 +94,9 @@ function forumdirectory_content(App $a) $total = 0; $cnt = DBA::fetchFirst("SELECT COUNT(*) AS `total` FROM `profile` - LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` - WHERE $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed` `user`.`page-flags` = 2 $sql_extra"); + INNER JOIN `user` ON `user`.`uid` = `profile`.`uid` + WHERE $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed` `user`.`page-flags` = ? $sql_extra", + User::PAGE_FLAGS_COMMUNITY); if (DBA::isResult($cnt)) { $total = $cnt['total']; } @@ -106,11 +108,11 @@ function forumdirectory_content(App $a) $limit = $pager->getStart()."," . $pager->getItemsPerPage(); $r = DBA::p("SELECT `profile`.*, `user`.`nickname`, `user`.`timezone` , `user`.`page-flags`, - `contact`.`addr`, `contact`.`url` AS `profile_url` FROM `profile` - LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` - LEFT JOIN `contact` ON `contact`.`uid` = `user`.`uid` - WHERE $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed` AND `user`.`page-flags` = 2 AND `contact`.`self` - $sql_extra $order LIMIT $limit" + `contact`.`addr`, `contact`.`url` FROM `profile` + INNER JOIN `user` ON `user`.`uid` = `profile`.`uid` + INNER JOIN `contact` ON `contact`.`uid` = `user`.`uid` + WHERE $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed` AND `user`.`page-flags` = ? AND `contact`.`self` + $sql_extra $order LIMIT $limit", User::PAGE_FLAGS_COMMUNITY ); if (DBA::isResult($r)) { -- 2.43.0