From 39c6e34098e5adc950484633aee0b9bb7afb1d63 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 16 Feb 2011 13:56:30 -0500 Subject: [PATCH] add path separators for Plugin::path() --- lib/plugin.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/plugin.php b/lib/plugin.php index 1ccf23a095..0e8c0a742d 100644 --- a/lib/plugin.php +++ b/lib/plugin.php @@ -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; -- 2.39.5