extra comments
This commit is contained in:
parent
fb49b785ef
commit
625406e591
2 changed files with 12 additions and 1 deletions
|
@ -157,7 +157,7 @@ if(class_exists("\\PHPUnit\\Framework\\TestCase")) {
|
||||||
} elseif ($page->mode == PageMode::DATA) {
|
} elseif ($page->mode == PageMode::DATA) {
|
||||||
return $page->data;
|
return $page->data;
|
||||||
} else {
|
} else {
|
||||||
$this->fail("Page mode is not PAGE or DATA");
|
$this->fail("Page mode is {$page->mode->name} (only PAGE and DATA are supported)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
public static function get_user_class_privs(User $user): array
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
@ -434,6 +439,12 @@ class Ratings extends Extension
|
||||||
return $config->get_array("ext_rating_".$user->class->name."_privs");
|
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
|
public static function get_user_default_ratings(): array
|
||||||
{
|
{
|
||||||
global $user_config, $user;
|
global $user_config, $user;
|
||||||
|
|
Reference in a new issue