]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/plugin.php
pre-fetch groups for notices
[quix0rs-gnu-social.git] / lib / plugin.php
index 115bb10e01247c206808ccb5943aaa3aa92a1c04..0e8c0a742d92f4deb25a35a7da2bfc01f45d04ed 100644 (file)
@@ -152,12 +152,24 @@ class Plugin
             }
         }
 
-        $path = common_config('plugins', 'path');
+        if ($isHTTPS) {
+            $path = common_config('plugins', 'sslpath');
+        } else {
+            $path = common_config('plugins', 'path');
+        }
 
         if (empty($path)) {
             $path = common_config('site', 'path') . '/plugins/';
         }
 
+        if ($path[strlen($path)-1] != '/') {
+            $path .= '/';
+        }
+
+        if ($path[0] != '/') {
+            $path = '/'.$path;
+        }
+
         $protocol = ($isHTTPS) ? 'https' : 'http';
 
         return $protocol.'://'.$server.$path.$plugin.'/'.$relative;