]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/plugin.php
get the correct context for apitimelinementions
[quix0rs-gnu-social.git] / lib / plugin.php
index 1ccf23a0952d1bce36125a7c7e0ef7d0ab08ed01..0e8c0a742d92f4deb25a35a7da2bfc01f45d04ed 100644 (file)
@@ -162,6 +162,14 @@ class Plugin
             $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;