X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fsiteprofile.php;h=6ab095d7121cfa573945cb309500800685a55b5c;hb=9ea57e5cb2622a8fc86c0cdd2cb6e73c0219fa51;hp=f43f89b1f940d8986e0e1488727f434f27bc40bf;hpb=3ad3535cd8d12787d1af95969b9576620abce4a9;p=quix0rs-gnu-social.git diff --git a/lib/siteprofile.php b/lib/siteprofile.php index f43f89b1f9..6ab095d712 100644 --- a/lib/siteprofile.php +++ b/lib/siteprofile.php @@ -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,13 @@ class PublicSite extends SiteProfileSettings ) ), 'plugins' => array( - 'default' => array( - 'Bookmark' => null, - 'ClientSideShorten' => null, + 'core' => self::corePlugins(), + 'default' => array_merge(self::defaultPlugins(), array( 'Directory' => null, - 'Event' => null, 'ExtendedProfile' => null, - 'Geonames' => null, - 'Gravatar' => null, - 'OpenID' => null, 'OStatus' => null, - 'Poll' => null, - 'QnA' => null, - 'SearchSub' => null, - 'StrictTransportSecurity' => null, - 'TagSub' => null - ) + 'WebFinger' => null, + )) ), 'discovery' => array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.) ); @@ -143,24 +144,14 @@ class PrivateSite extends SiteProfileSettings ) ), 'plugins' => array( - 'default' => array( - 'Bookmark' => null, - 'ClientSideShorten' => null, + 'core' => self::corePlugins(), + 'default' => array_merge(self::defaultPlugins(), array( '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 - ) + )) ), 'profile' => array('delete' => 'true'), 'license' => array('type' => 'private'), @@ -205,21 +196,12 @@ class CommunitySite extends SiteProfileSettings ) ), 'plugins' => array( - 'default' => array( - 'Bookmark' => null, - 'ClientSideShorten' => null, + 'core' => self::corePlugins(), + 'default' => array_merge(self::defaultPlugins(), array( 'Directory' => null, - 'Event' => null, - 'Geonames' => null, - 'Gravatar' => null, - 'OpenID' => null, 'OStatus' => null, - 'Poll' => null, - 'QnA' => null, - 'SearchSub' => null, - 'StrictTransportSecurity' => null, - 'TagSub' => null - ) + 'WebFinger' => null, + )) ), 'discovery' => array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.) ); @@ -249,23 +231,15 @@ class SingleuserSite extends SiteProfileSettings ) ), 'plugins' => array( - 'default' => array( - 'Bookmark' => null, - 'ClientSideShorten' => null, - 'Event' => null, - 'Geonames' => null, + 'core' => self::corePlugins(), + 'default' => array_merge(self::defaultPlugins(), array( 'NewMenu' => null, 'MobileProfile' => null, - 'OpenID' => null, 'OStatus' => null, - 'Poll' => null, - 'QnA' => null, - 'SearchSub' => null, - 'StrictTransportSecurity' => null, - 'TagSub' => null, 'TwitterBridge' => null, 'FacebookBridge' => null, - ) + 'WebFinger' => null, + )) ), 'discovery' => array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.) );