From: Evan Prodromou Date: Wed, 7 Mar 2012 21:04:49 +0000 (-0600) Subject: Plugin::path() checks local/plugins/ first X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=376a19f3c110de328365d4a0c124a504d1458c7b;p=quix0rs-gnu-social.git Plugin::path() checks local/plugins/ first --- 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] != '/') {