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
1 changed files with 6 additions and 1 deletions

View File

@ -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] != '/') {