X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fsiteprofile.php;h=a2c09efb2f6be08f5dc0919573ff1a0b601d5d71;hb=91c1ab601726d6dd1fc13236be7723929d7dad9a;hp=b5c6fc304cbe827538a5aa01d95ee492d01cf669;hpb=8c710ad2c1b80544acccb515f7b601aadff2de16;p=quix0rs-gnu-social.git diff --git a/lib/siteprofile.php b/lib/siteprofile.php index b5c6fc304c..a2c09efb2f 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,23 +108,10 @@ class PublicSite extends SiteProfileSettings ) ), 'plugins' => array( - 'default' => array( - 'Activity' => null, - '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( + 'RegisterThrottle' => array(), + )) ), 'discovery' => array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.) ); @@ -144,26 +141,16 @@ class PrivateSite extends SiteProfileSettings ) ), 'plugins' => array( - 'default' => array( - 'Activity' => null, - '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, ), + 'public' => array('localonly' => true), 'profile' => array('delete' => 'true'), 'license' => array('type' => 'private'), 'attachments' => array( @@ -203,27 +190,16 @@ class CommunitySite extends SiteProfileSettings 'site' => array_merge( $config['site'], array( 'private' => false, + 'inviteonly' => true, 'closed' => false ) ), 'plugins' => array( - 'default' => array( - 'Activity' => null, - '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( + )) ), + 'public' => array('localonly' => true), 'discovery' => array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.) ); } @@ -249,28 +225,17 @@ class SingleuserSite extends SiteProfileSettings $config['site'], array( 'private' => false, 'closed' => true, + 'localonly' => true, ) ), 'plugins' => array( - 'default' => array( - 'Activity' => null, - '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, ), + 'public' => array('localonly' => true), 'discovery' => array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.) ); }