From: garvinhicking Date: Thu, 19 May 2005 16:55:46 +0000 (+0000) Subject: propper fix X-Git-Tag: 0.8.2~8 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=bc96f939426b4417301b2f6853e7fa54e31183ab;p=s9y.git propper fix --- diff --git a/include/plugin_api.inc.php b/include/plugin_api.inc.php index b6a75b5..65aaac8 100644 --- a/include/plugin_api.inc.php +++ b/include/plugin_api.inc.php @@ -298,11 +298,15 @@ class serendipity_plugin_api { function includePlugin($name, $pluginPath = '') { global $serendipity; + if (empty($pluginPath)) { + $pluginPath = $name; + } + // First try the local path, and then (if existing) a shared library repository ... if (file_exists($serendipity['serendipityPath'] . 'plugins/' . $pluginPath . '/' . $name . '.php')) { - include $serendipity['serendipityPath'] . 'plugins/' . $pluginPath . '/' . $name . '.php'; + include_once $serendipity['serendipityPath'] . 'plugins/' . $pluginPath . '/' . $name . '.php'; } elseif (file_exists(S9Y_INCLUDE_PATH . 'plugins/' . $pluginPath . '/' . $name . '.php')) { - include S9Y_INCLUDE_PATH . 'plugins/' . $pluginPath . '/' . $name . '.php'; + include_once S9Y_INCLUDE_PATH . 'plugins/' . $pluginPath . '/' . $name . '.php'; } }