]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/statusnet.php
PATHINFO example added to htaccess.sample
[quix0rs-gnu-social.git] / lib / statusnet.php
index e596dd96d13a07d2979f565658b019567b1a2f7f..a9b05388c393f6e0e6a4a51c55c96407a2a08845 100644 (file)
@@ -91,6 +91,20 @@ class StatusNet
         return true;
     }
 
+    public static function delPlugin($name)
+    {
+        // Remove our plugin if it was previously loaded
+        $name = ucfirst($name);
+        if (isset(self::$plugins[$name])) {
+            unset(self::$plugins[$name]);
+        }
+
+        // make sure initPlugins will avoid this
+        common_config_set('plugins', 'disable-'.$name, true);
+
+        return true;
+    }
+
     /**
      * Get a list of activated plugins in this process.
      * @return array of (string $name, array $args) pairs
@@ -205,6 +219,8 @@ class StatusNet
                 continue;
             }
 
+            // TODO: We should be able to avoid this is_null and assume $params
+            // is an array, since that's how it is typed in addPlugin
             if (is_null($params)) {
                 self::addPlugin($name);
             } else if (is_array($params)) {
@@ -327,7 +343,7 @@ class StatusNet
     {
         global $config;
         $settings = SiteProfile::getSettings($name);
-        $config = array_merge($config, $settings);
+        $config = array_replace_recursive($config, $settings);
     }
 
     protected static function _sn_to_path($sn)