Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?hh
- function workspaces_get_pref_stats_only_admins(workspace_t $workspace): bool {
- # Logging with a low sample rate
- if (mt_rand(1, 5000) == 7){
- log_event('workspaces_prefs_get', array('pref_name' => 'stats_only_admins'));
- }
- $ret = workspaces_prefs_get_single_safe($workspace, 'stats_only_admins');
- if ($ret->is_error()) throw new WorkspacePrefFetchException('Workspace pref fetch failure');
- return (bool)$ret->get();
- }
Add Comment
Please, Sign In to add comment