public static function getPermissions() { global $wgEnableEmail, $wgFbUserRightsFromGroup, $wgFbOpenGraph, $wgFbOpenGraphRegisteredActions; if (self::$scope === NULL) { $scope = array(); if (!empty($wgEnableEmail)) { $scope[] = 'email'; } if (!empty($wgFbUserRightsFromGroup)) { $scope[] = 'user_groups'; } if (!empty($wgFbOpenGraph) && !empty($wgFbOpenGraphRegisteredActions)) { $scope[] = 'publish_actions'; } wfRunHooks('FacebookPermissions', array(&$scope)); self::$scope = $scope; } return implode(',', self::$scope); }