From 46e0ccfcd7904a2c4610cb1643e59d7468994986 Mon Sep 17 00:00:00 2001 From: brettp Date: Fri, 7 Jan 2011 21:59:51 +0000 Subject: Refs #2781: Using same technique to check for full plugin path in ElggPlugin. git-svn-id: http://code.elgg.org/elgg/trunk@7859 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/classes/ElggPlugin.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engine') 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 -- cgit v1.2.3