]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/siteprofile.php
Merge commit 'refs/merge-requests/41' of https://gitorious.org/social/mainline into...
[quix0rs-gnu-social.git] / lib / siteprofile.php
index 55aeaa972f2b9466292ecc428f69fc57adea3b3b..4bbffea7542ccd149ded02acad15b64f4762c4bb 100644 (file)
@@ -28,7 +28,7 @@
  * @link      http://status.net/
  */
 
-if (!defined('STATUSNET')) {
+if (!defined('GNUSOCIAL')) {
     exit(1);
 }
 
@@ -73,19 +73,16 @@ 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 array(
-            'Bookmark'                => null,
-            'Event'                   => null,
-            'OpenID'                  => null,
-            'Poll'                    => null,
-            'QnA'                     => null,
-            'SearchSub'               => null,
-            'StrictTransportSecurity' => null,
-            'TagSub'                  => null,
-        );
+        return common_config('plugins', 'default');
     }
 }
 
@@ -111,13 +108,10 @@ class PublicSite extends SiteProfileSettings
                 )
             ),
             'plugins' => array(
+                'core'    => self::corePlugins(),
                 'default' => array_merge(self::defaultPlugins(), array(
-                    'ClientSideShorten'       => null,
-                    'Directory'               => null,
-                    'ExtendedProfile'         => null,
-                    'Geonames'                => null,
-                    'Gravatar'                => null,
-                    'OStatus'                 => null,
+                    'ExtendedProfile'         => array(),
+                    'RegisterThrottle'        => array(),
                 ))
             ),
             'discovery' => array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.)
@@ -148,17 +142,16 @@ class PrivateSite extends SiteProfileSettings
                 )
             ),
             'plugins' => array(
+                'core'    => self::corePlugins(),
                 'default' => array_merge(self::defaultPlugins(), array(
-                    'ClientSideShorten'       => null,
-                    'Directory'               => null,
-                    'ExtendedProfile'         => null,
-                    'EmailRegistration'       => null,
-                    'Geonames'                => null,
-                    'Gravatar'                => null,
-                    'NewMenu'                 => null,
-                    'MobileProfile'           => null,
-                ))
+                    '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(
@@ -198,18 +191,16 @@ class CommunitySite extends SiteProfileSettings
             'site' => array_merge(
                 $config['site'], array(
                     'private'    => false,
+                    'inviteonly' => true,
                     'closed'     => false
                 )
             ),
             'plugins' => array(
+                'core'    => self::corePlugins(),
                 'default' => array_merge(self::defaultPlugins(), array(
-                    'ClientSideShorten'       => null,
-                    'Directory'               => null,
-                    'Geonames'                => null,
-                    'Gravatar'                => null,
-                    'OStatus'                 => null,
                 ))
             ),
+            'public'    => array('localonly' => true),
             'discovery' => array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.)
         );
     }
@@ -235,19 +226,17 @@ class SingleuserSite extends SiteProfileSettings
                 $config['site'], array(
                     'private'    => false,
                     'closed'     => true,
+                    'localonly'  => true,
                 )
             ),
             'plugins' => array(
+                'core'    => self::corePlugins(),
                 'default' => array_merge(self::defaultPlugins(), array(
-                    'ClientSideShorten'       => null,
-                    'Geonames'                => null,
-                    'NewMenu'                 => null,
-                    'MobileProfile'           => null,
-                    'OStatus'                 => null,
-                    'TwitterBridge'           => null,
-                    'FacebookBridge'          => null,
-                ))
+                    '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.)
         );
     }