aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-29 14:35:19 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-29 14:35:19 +0000
commitdd4b4a30093c9e3df90f6d92962fbc8e75f15147 (patch)
treef066b25c4ebc2463cb1b5c1a8f77ee921a403bc3 /engine
parent0ea7e01355a3dc6a63e2b6ade3f68fce67cab1ee (diff)
downloadelgg-dd4b4a30093c9e3df90f6d92962fbc8e75f15147.tar.gz
elgg-dd4b4a30093c9e3df90f6d92962fbc8e75f15147.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Simplified call_gatekeeper() git-svn-id: https://code.elgg.org/elgg/trunk@757 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/elgglib.php35
1 files changed, 22 insertions, 13 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 9d0719a5e..3b48610c1 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -1029,18 +1029,8 @@
// If file then check using reflection that this it is being called from this function
if ($file)
{
- $mirror = false;
-
- if (is_array($function))
- $mirror = new ReflectionMethod($stack_element['class'], $stack_element['function']);
- else
- $mirror = new ReflectionFunction($stack_element['function']);
-
- // Sanity check
- if (!$mirror) return false;
-
// Check file against function
- if (!strcmp($file, $mirror->getFileName())==0)
+ if (!strcmp($file, $stack_element['file'])==0)
return false;
}
@@ -1048,8 +1038,27 @@
return true;
}
-
-
+ /**
+ * This function checks to see if it is being called at somepoint by a function defined somewhere
+ * on a given path (optionally including subdirectories).
+ */
+ /*function callpath_gatekeeper($path, $include_subdirs = true)
+ {
+ $path = sanitise_string($path);
+
+ if ($path)
+ {
+ $callstack = debug_backtrace();
+
+ foreach ($callstack as $call)
+ {
+ if
+ }
+ }
+
+ return false;
+ }
+*/
// register privileged code block