From 95222df899a9ec3be564170ac78833f249306d0c Mon Sep 17 00:00:00 2001 From: root Date: Tue, 31 Dec 2013 23:56:56 +0000 Subject: [PATCH] check local/plugins before plugins in Plugin::onAutoload --- lib/plugin.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/plugin.php b/lib/plugin.php index 605a4d12b5..5acdc1c2ba 100644 --- a/lib/plugin.php +++ b/lib/plugin.php @@ -99,7 +99,11 @@ class Plugin */ public function onAutoload($cls) { $cls = basename($cls); - $basedir = INSTALLDIR . '/plugins/' . mb_substr(get_called_class(), 0, -6); + $basedir = INSTALLDIR . '/local/plugins/' . mb_substr(get_called_class(), 0, -6); + if (!file_exists($basedir)) { + $basedir = INSTALLDIR . '/plugins/' . mb_substr(get_called_class(), 0, -6); + } + $file = null; if (preg_match('/^(\w+)(Action|Form)$/', $cls, $type)) { -- 2.39.5