]> git.mjollnir.org Git - s9y.git/commitdiff
propper fix
authorgarvinhicking <garvinhicking>
Thu, 19 May 2005 16:55:24 +0000 (16:55 +0000)
committergarvinhicking <garvinhicking>
Thu, 19 May 2005 16:55:24 +0000 (16:55 +0000)
include/plugin_api.inc.php

index b6a75b5760fc1d221057eb3f9b1d243fe107d10d..65aaac8c036567da9a026556ca54f76449644c4a 100644 (file)
@@ -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';
         }
     }