X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=lib%2Fsiteprofile.php;h=569a4bbaf8d56f9eb987821784352822e137c8f2;hb=ed3cea80f60ae893583e823bc6981b20f2f01888;hp=f43f89b1f940d8986e0e1488727f434f27bc40bf;hpb=3fc1d245a179efabfa862d3539642fe0fc67f856;p=quix0rs-gnu-social.git diff --git a/lib/siteprofile.php b/lib/siteprofile.php index f43f89b1f9..569a4bbaf8 100644 --- a/lib/siteprofile.php +++ b/lib/siteprofile.php @@ -28,7 +28,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET')) { +if (!defined('GNUSOCIAL')) { exit(1); } @@ -73,7 +73,17 @@ class SiteProfile */ abstract class SiteProfileSettings { - abstract static function getSettings(); + static function getSettings() + { + throw new MethodNotImplementedException(__METHOD__); + } + + static function corePlugins() { + return common_config('plugins', 'core'); + } + static function defaultPlugins() { + return common_config('plugins', 'default'); + } } /** @@ -98,22 +108,11 @@ class PublicSite extends SiteProfileSettings ) ), 'plugins' => array( - 'default' => array( - 'Bookmark' => null, - 'ClientSideShorten' => null, - 'Directory' => null, - 'Event' => null, - 'ExtendedProfile' => null, - 'Geonames' => null, - 'Gravatar' => null, - 'OpenID' => null, - 'OStatus' => null, - 'Poll' => null, - 'QnA' => null, - 'SearchSub' => null, - 'StrictTransportSecurity' => null, - 'TagSub' => null - ) + 'core' => self::corePlugins(), + 'default' => array_merge(self::defaultPlugins(), array( + 'ExtendedProfile' => array(), + 'RegisterThrottle' => array(), + )) ), 'discovery' => array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.) ); @@ -143,24 +142,14 @@ class PrivateSite extends SiteProfileSettings ) ), 'plugins' => array( - 'default' => array( - 'Bookmark' => null, - 'ClientSideShorten' => null, - 'Directory' => null, - 'Event' => null, - 'ExtendedProfile' => null, - 'EmailRegistration' => null, - 'Geonames' => null, - 'Gravatar' => null, - 'NewMenu' => null, - 'MobileProfile' => null, - 'OpenID' => null, - 'Poll' => null, - 'QnA' => null, - 'SearchSub' => null, - 'StrictTransportSecurity' => null, - 'TagSub' => null - ) + 'core' => self::corePlugins(), + 'default' => array_merge(self::defaultPlugins(), array( + 'ExtendedProfile' => array(), + 'EmailRegistration' => array(), + 'MobileProfile' => array(), + )), + 'disable-OStatus' => 1, + 'disable-WebFinger' => 1, ), 'profile' => array('delete' => 'true'), 'license' => array('type' => 'private'), @@ -201,25 +190,14 @@ class CommunitySite extends SiteProfileSettings 'site' => array_merge( $config['site'], array( 'private' => false, + 'inviteonly' => true, 'closed' => false ) ), 'plugins' => array( - 'default' => array( - 'Bookmark' => null, - 'ClientSideShorten' => null, - 'Directory' => null, - 'Event' => null, - 'Geonames' => null, - 'Gravatar' => null, - 'OpenID' => null, - 'OStatus' => null, - 'Poll' => null, - 'QnA' => null, - 'SearchSub' => null, - 'StrictTransportSecurity' => null, - 'TagSub' => null - ) + 'core' => self::corePlugins(), + 'default' => array_merge(self::defaultPlugins(), array( + )) ), 'discovery' => array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.) ); @@ -249,23 +227,11 @@ class SingleuserSite extends SiteProfileSettings ) ), 'plugins' => array( - 'default' => array( - 'Bookmark' => null, - 'ClientSideShorten' => null, - 'Event' => null, - 'Geonames' => null, - 'NewMenu' => null, - 'MobileProfile' => null, - 'OpenID' => null, - 'OStatus' => null, - 'Poll' => null, - 'QnA' => null, - 'SearchSub' => null, - 'StrictTransportSecurity' => null, - 'TagSub' => null, - 'TwitterBridge' => null, - 'FacebookBridge' => null, - ) + 'core' => self::corePlugins(), + 'default' => array_merge(self::defaultPlugins(), array( + 'MobileProfile' => array(), + )), + 'disable-Directory' => 1, ), 'discovery' => array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.) );