Merge pull request #9277 from annando/issue-9268

Issue 9268: Don't show posts from followers on community page
2022.09-rc
Hypolite Petovan 2020-09-26 08:28:01 -04:00 zatwierdzone przez GitHub
commit 8e6483970a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -295,6 +295,11 @@ class Community extends BaseModule
return []; return [];
} }
if (local_user() && DI::config()->get('system', 'community_no_followers')) {
$condition[0] .= " AND NOT EXISTS (SELECT `uri-id` FROM `thread` AS t1 WHERE `t1`.`uri-id` = `thread`.`uri-id` AND `t1`.`uid` = ?)";
$condition[] = local_user();
}
if (isset($max_id)) { if (isset($max_id)) {
$condition[0] .= " AND `commented` < ?"; $condition[0] .= " AND `commented` < ?";
$condition[] = $max_id; $condition[] = $max_id;

Wyświetl plik

@ -122,6 +122,10 @@ return [
// Deny public access to the local user directory. // Deny public access to the local user directory.
'block_local_dir' => false, 'block_local_dir' => false,
// community_no_followers (Boolean)
// Don't display followers on the global community
'community_no_followers' => false,
// cron_interval (Integer) // cron_interval (Integer)
// Minimal period in minutes between two calls of the "Cron" worker job. // Minimal period in minutes between two calls of the "Cron" worker job.
'cron_interval' => 5, 'cron_interval' => 5,