aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-07 21:59:51 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-07 21:59:51 +0000
commit46e0ccfcd7904a2c4610cb1643e59d7468994986 (patch)
tree07f78ebb9b7ed0d732c8c1dda8cb6f760c03db59
parent7b1c18db0c350c0b0c2bb918bafc9f6574f49b17 (diff)
downloadelgg-46e0ccfcd7904a2c4610cb1643e59d7468994986.tar.gz
elgg-46e0ccfcd7904a2c4610cb1643e59d7468994986.tar.bz2
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
-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