diff --git a/php/servers/servers-rooms.php b/php/servers/servers-rooms.php index a153742..a71f098 100644 --- a/php/servers/servers-rooms.php +++ b/php/servers/servers-rooms.php @@ -641,13 +641,10 @@ * Determine whether the Community is not safe for work. */ public function rated_nsfw(): bool { - global $NSFW_INCLUDE, $NSFW_EXCLUDE; + $safety_override = + LocalConfig::get_instance()->get_room_safety_override($this); - if ($this->matched_by_list($NSFW_EXCLUDE)) { - return false; - } - - return $this->has_nsfw_keywords() || $this->matched_by_list($NSFW_INCLUDE); + return $safety_override->rated_nsfw() ?? $this->has_nsfw_keywords(); } /** @@ -656,8 +653,9 @@ * @return bool */ public function is_testing_room(): bool { - global $TESTING_INCLUDE; - return in_array("test", $this->string_tags) || $this->matched_by_list($TESTING_INCLUDE); + return + in_array("test", $this->string_tags) + || LocalConfig::get_instance()->is_testing_room($this); } /** @@ -666,8 +664,7 @@ * @return bool */ public function is_stickied_room(): bool { - global $STICKIED_ROOMS; - return $this->matched_by_list($STICKIED_ROOMS); + return LocalConfig::get_instance()->is_stickied_room($this); } /** diff --git a/sites/+components/footer.php b/sites/+components/footer.php index 03453dc..7432537 100644 --- a/sites/+components/footer.php +++ b/sites/+components/footer.php @@ -102,8 +102,8 @@ href="https://session.directory/" class="footer__nav-target" target="_blank" - title="User-submitted closed groups, communities and user profiles. Not safe for work." - >session.directory (NSFW)session.directory