From 376a19f3c110de328365d4a0c124a504d1458c7b Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 7 Mar 2012 15:04:49 -0600 Subject: [PATCH] Plugin::path() checks local/plugins/ first --- lib/plugin.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/plugin.php b/lib/plugin.php index 0e8c0a742d..a5424e06ca 100644 --- a/lib/plugin.php +++ b/lib/plugin.php @@ -159,7 +159,12 @@ class Plugin } if (empty($path)) { - $path = common_config('site', 'path') . '/plugins/'; + // XXX: extra stat(). + if (@file_exists(INSTALLDIR.'/local/plugins/'.$plugin.'/'.$relative)) { + $path = common_config('site', 'path') . '/local/plugins/'; + } else { + $path = common_config('site', 'path') . '/plugins/'; + } } if ($path[strlen($path)-1] != '/') { -- 2.39.5