aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/classes/ElggPlugin.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/engine/classes/ElggPlugin.php b/engine/classes/ElggPlugin.php
index 3352105f8..142ccdf98 100644
--- a/engine/classes/ElggPlugin.php
+++ b/engine/classes/ElggPlugin.php
@@ -50,10 +50,12 @@ class ElggPlugin extends ElggObject {
parent::__construct($plugin);
$this->path = get_config('plugins_path') . $this->getID();
} else {
+ $plugin_path = elgg_get_plugin_path();
+
// not a full path, so assume an id
// use the default path
- if (substr($plugin, 0, 1) != '/') {
- $plugin = elgg_get_plugin_path() . $plugin;
+ if (!strpos($plugin, $plugin_path) === 0) {
+ $plugin = $plugin_path . $plugin;
}
// path checking is done in the package