|
|
@ -641,13 +641,10 @@
|
|
|
|
* Determine whether the Community is not safe for work.
|
|
|
|
* Determine whether the Community is not safe for work.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function rated_nsfw(): bool {
|
|
|
|
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 $safety_override->rated_nsfw() ?? $this->has_nsfw_keywords();
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $this->has_nsfw_keywords() || $this->matched_by_list($NSFW_INCLUDE);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -656,8 +653,9 @@
|
|
|
|
* @return bool
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function is_testing_room(): bool {
|
|
|
|
public function is_testing_room(): bool {
|
|
|
|
global $TESTING_INCLUDE;
|
|
|
|
return
|
|
|
|
return in_array("test", $this->string_tags) || $this->matched_by_list($TESTING_INCLUDE);
|
|
|
|
in_array("test", $this->string_tags)
|
|
|
|
|
|
|
|
|| LocalConfig::get_instance()->is_testing_room($this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -666,8 +664,7 @@
|
|
|
|
* @return bool
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function is_stickied_room(): bool {
|
|
|
|
public function is_stickied_room(): bool {
|
|
|
|
global $STICKIED_ROOMS;
|
|
|
|
return LocalConfig::get_instance()->is_stickied_room($this);
|
|
|
|
return $this->matched_by_list($STICKIED_ROOMS);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|