diff options
author | wn_ <[email protected]> | 2021-11-14 22:03:52 +0000 |
---|---|---|
committer | wn_ <[email protected]> | 2021-11-14 22:03:52 +0000 |
commit | baa3cd37c996322fc8a314134d34f6e6e044faa3 (patch) | |
tree | 00c09e916d9cfc61278691afea6c2424412dc9e1 | |
parent | 772aaf80ae16940567781a1a966607009321fb6b (diff) |
Add PHPDoc stuff from Plugin, use constants for access level stuff.
-rw-r--r-- | init.php | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -7,6 +7,7 @@ class Prefs_Effective_Config extends Plugin { Config::T_INT => 'integer', ]; + /** @return array<null|float|string|bool> */ function about() { return [ null, // version @@ -17,10 +18,16 @@ class Prefs_Effective_Config extends Plugin { ]; } + /** @return int */ function api_version() { return 2; } + /** + * @param PluginHost $host + * + * @return void + * */ function init($host) { $host->add_hook($host::HOOK_PREFS_TAB, $this); } @@ -144,7 +151,7 @@ class Prefs_Effective_Config extends Plugin { } private static function is_admin(): bool { - return ($_SESSION['access_level'] ?? 0) >= 10; + return ($_SESSION['access_level'] ?? UserHelper::ACCESS_LEVEL_DISABLED) >= UserHelper::ACCESS_LEVEL_ADMIN; } /** |