aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggPluginPackage.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-07 22:00:33 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-07 22:00:33 +0000
commit101c850e6723d55759a6cf75965a2473ec2a55d5 (patch)
tree6316c8946103f06a338b1bf9b1cc9988dcca6ca1 /engine/classes/ElggPluginPackage.php
parent46e0ccfcd7904a2c4610cb1643e59d7468994986 (diff)
downloadelgg-101c850e6723d55759a6cf75965a2473ec2a55d5.tar.gz
elgg-101c850e6723d55759a6cf75965a2473ec2a55d5.tar.bz2
Refs #2781: Checking if a dir was passed as a plugin package. Need to do this to allow packages to be loaded outside of plugin_dir.
git-svn-id: http://code.elgg.org/elgg/trunk@7860 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/classes/ElggPluginPackage.php')
-rw-r--r--engine/classes/ElggPluginPackage.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/engine/classes/ElggPluginPackage.php b/engine/classes/ElggPluginPackage.php
index c13345e67..74c8bd020 100644
--- a/engine/classes/ElggPluginPackage.php
+++ b/engine/classes/ElggPluginPackage.php
@@ -94,7 +94,9 @@ class ElggPluginPackage {
*/
public function __construct($plugin, $validate = true) {
$plugin_path = elgg_get_plugin_path();
- if (strpos($plugin, $plugin_path) === 0) {
+ // @todo wanted to avoid another is_dir() call here.
+ // should do some profiling to see how much it affects
+ if (strpos($plugin, $plugin_path) === 0 || is_dir($plugin)) {
// this is a path
$path = sanitise_filepath($plugin);