From f6e614b8943be20e9688bdf970e236e19ac06aae Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 11 Feb 2011 15:58:47 -0500 Subject: [PATCH] add plugins/sslpath setting, default to site path/plugins --- README | 1 + lib/default.php | 1 + lib/plugin.php | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README b/README index f290ef4244..c27182395c 100644 --- a/README +++ b/README @@ -1588,6 +1588,7 @@ sslserver: Server to find static files for a plugin when the page is HTTPS. Defa path: Path to the plugin files. defaults to site/path + '/plugins/'. Expects that each plugin will have a subdirectory at plugins/NameOfPlugin. Change this if you're using a CDN. +sslpath: Path to use on the SSL server. Same as plugins/path. Plugins ======= diff --git a/lib/default.php b/lib/default.php index 7d8b1fec7a..124c90c998 100644 --- a/lib/default.php +++ b/lib/default.php @@ -317,6 +317,7 @@ $default = 'server' => null, 'sslserver' => null, 'path' => null, + 'sslpath' => null, ), 'admin' => array('panels' => array('design', 'site', 'user', 'paths', 'access', 'sessions', 'sitenotice', 'license')), diff --git a/lib/plugin.php b/lib/plugin.php index 115bb10e01..1ccf23a095 100644 --- a/lib/plugin.php +++ b/lib/plugin.php @@ -152,7 +152,11 @@ 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/';