]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
site-wide option to enable old-school settings
authorEvan Prodromou <evan@status.net>
Sat, 24 Sep 2011 13:46:13 +0000 (09:46 -0400)
committerEvan Prodromou <evan@status.net>
Sat, 24 Sep 2011 13:46:13 +0000 (09:46 -0400)
CONFIGURE
classes/User.php
lib/default.php

index 285ccd11b350bfb26c2f926c9473ba8912237383..c5fac78730c88358833c5b9ccb9a1b0efe3e795c 100644 (file)
--- a/CONFIGURE
+++ b/CONFIGURE
@@ -859,3 +859,12 @@ performance
 high: if you need high performance, or if you're seeing bad
       performance, set this to true. It will turn off some high-intensity code from
       the site.
+
+oldschool
+---------
+
+enabled: enable certain old-style user settings options, like stream-only mode,
+        conversation trees, and nicknames in streams. Off by default, and
+        may not be well supported in future versions.
+
+
index 2c84ac1995498ce7fc8ac880b71cbad8e3a56cc0..65bc0485bf1b4070862ac6929df2c1a0b8c7b35d 100644 (file)
@@ -1148,31 +1148,36 @@ class User extends Managed_DataObject
 
     function streamModeOnly()
     {
-        $osp = Old_school_prefs::staticGet('user_id', $this->id);
-        if (!empty($osp)) {
-            return $osp->stream_mode_only;
-        } else {
-            return false;
+        if (common_config('oldschool', 'enabled')) {
+            $osp = Old_school_prefs::staticGet('user_id', $this->id);
+            if (!empty($osp)) {
+                return $osp->stream_mode_only;
+            } 
         }
+
+        return false;
     }
 
     function conversationTree()
     {
-        $osp = Old_school_prefs::staticGet('user_id', $this->id);
-        if (!empty($osp)) {
-            return $osp->conversation_tree;
-        } else {
-            return false;
+        if (common_config('oldschool', 'enabled')) {
+            $osp = Old_school_prefs::staticGet('user_id', $this->id);
+            if (!empty($osp)) {
+                return $osp->conversation_tree;
+            }
         }
+
+        return false;
     }
 
     function streamNicknames()
     {
-        $osp = Old_school_prefs::staticGet('user_id', $this->id);
-        if (!empty($osp)) {
-            return $osp->stream_nicknames;
-        } else {
-            return false;
+        if (common_config('oldschool', 'enabled')) {
+            $osp = Old_school_prefs::staticGet('user_id', $this->id);
+            if (!empty($osp)) {
+                return $osp->stream_nicknames;
+            }
         }
+        return false;
     }
 }
index 8748b645804f282f6c607fe2acb0c65b386b131e..673c94769a89d90070c456f4fe6183becb69a55d 100644 (file)
@@ -352,5 +352,6 @@ $default =
         array('cache' => true), // whether to cache the router object. Defaults to true, turn off for devel
         'discovery' =>
           array('cors' => false), // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.)
-        'performance' => array('high' => false) // disable some features for higher performance; default false
+       'performance' => array('high' => false), // disable some features for higher performance; default false
+       'oldschool' => array('enabled' => false) // enable users to use old-style UI
     );