diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-20 13:00:41 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-20 13:00:41 +0000 |
commit | 6341f41c7e48912e03c3fdb01d108bff8539df06 (patch) | |
tree | 8f8f726825c2e9477f07a9ea8d299801a47f3785 /engine/lib/elgglib.php | |
parent | e84c224e72f12b8592e1e9f9ae82d63c8224a75d (diff) | |
download | elgg-6341f41c7e48912e03c3fdb01d108bff8539df06.tar.gz elgg-6341f41c7e48912e03c3fdb01d108bff8539df06.tar.bz2 |
Closes #60: Enable/disable plugins on a site by site basis
http://trac.elgg.org/elgg/ticket/60
git-svn-id: https://code.elgg.org/elgg/trunk@1021 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/elgglib.php')
-rw-r--r-- | engine/lib/elgglib.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 7a4f3df9b..cc7fbf209 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -1345,13 +1345,14 @@ $callstack = debug_backtrace(); $call_paths = array(); foreach ($callstack as $call) - $call_paths[] = sanitise_string($call['path']); - + $call_paths[] = sanitise_string($call['file']); + // Get privileged paths - $paths = get_data("SELECT * from {$CONFIG->dbprefix}privileged_paths"); + $paths = get_data("SELECT * from {$CONFIG->dbprefix}privileged_paths"); + foreach ($paths as $p) - { - if (in_array($CONFIG->path . $p->path, $call_paths)) + { + if (in_array( $p->path, $call_paths)) return true; } |