diff --git a/core/testcase.php b/core/testcase.php index 1d62e0ad..672f06fb 100644 --- a/core/testcase.php +++ b/core/testcase.php @@ -157,7 +157,7 @@ if(class_exists("\\PHPUnit\\Framework\\TestCase")) { } elseif ($page->mode == PageMode::DATA) { return $page->data; } else { - $this->fail("Page mode is not PAGE or DATA"); + $this->fail("Page mode is {$page->mode->name} (only PAGE and DATA are supported)"); } } diff --git a/ext/rating/main.php b/ext/rating/main.php index d02f5e27..34a1e4a6 100644 --- a/ext/rating/main.php +++ b/ext/rating/main.php @@ -427,6 +427,11 @@ class Ratings extends Extension ); } + /** + * Figure out which ratings a user is allowed to see + * + * @return string[] + */ public static function get_user_class_privs(User $user): array { global $config; @@ -434,6 +439,12 @@ class Ratings extends Extension return $config->get_array("ext_rating_".$user->class->name."_privs"); } + /** + * Figure out which ratings a user would like to see by default + * (Which will be a subset of what they are allowed to see) + * + * @return string[] + */ public static function get_user_default_ratings(): array { global $user_config, $user;