Plugin::path() checks local/plugins/ first

This commit is contained in:
Evan Prodromou 2012-03-07 15:04:49 -06:00
parent aa14a14f86
commit 376a19f3c1

View File

@ -159,8 +159,13 @@ class Plugin
} }
if (empty($path)) { if (empty($path)) {
// 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/'; $path = common_config('site', 'path') . '/plugins/';
} }
}
if ($path[strlen($path)-1] != '/') { if ($path[strlen($path)-1] != '/') {
$path .= '/'; $path .= '/';