diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-09-15 16:31:31 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-09-15 16:31:31 +0000 |
commit | f3b74cdeb69484881f7e96b1b846cf6d9bb94425 (patch) | |
tree | cdff48e24d4b3476d7d42b9a8c1479f588812e58 /engine/lib | |
parent | 321e3a7f7019286a9d2a0e6b34cdc20a4a113074 (diff) | |
download | elgg-f3b74cdeb69484881f7e96b1b846cf6d9bb94425.tar.gz elgg-f3b74cdeb69484881f7e96b1b846cf6d9bb94425.tar.bz2 |
Removed privileged path code since this is no longer used
git-svn-id: https://code.elgg.org/elgg/trunk@2083 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/elgglib.php | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 87fd40172..1562fd003 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -1634,85 +1634,6 @@ }
return false;
} - - /** - * A utility function which returns true if the code is currently running with - * extended privileges (as provided by execute_privileged_codeblock().) - * - * This is essentially a wrapper around call_gatekeeper(). - * - * @return bool - */ - /*function is_privileged() - { - global $CONFIG; - - return call_gatekeeper('execute_privileged_codeblock', $CONFIG->path . 'engine/lib/elgglib.php'); - }*/ - - /** - * Execute a function as a privileged user. - * - * Privileged code blocks should be in the format of "function(array $params)" whether they - * are in a class or a standalone object. - * - * Before executing it triggers an event "execute_privileged_codeblock" which gives code the option - * to deny access based on a number factors (simply return false). - * - * @param mixed $function The function (or array(object,method)) to execute. - * @param array $params The parameters passed to the function as an array - * @return the result of the executed codeblock - * @throws SecurityException - */ - /*function execute_privileged_codeblock($function, array $params = null) - { - // Test path first - if (can_path_execute_privileged_codeblock()) - { - // Test to see if we can actually execute code by calling any other functions - if (trigger_elgg_event("execute_privileged_codeblock", "all")) - { - // Execute - $result = null; - - if (is_array($function)) - $result = $function[0]->$function[1]($params); - else - $result = $function($params); - - // Return value - return $result; - } - } - - throw new SecurityException(elgg_echo("SecurityException:Codeblock")); - }*/ - - /** - * Validate that a given path has privileges to execute a piece of privileged code. - * - */ - /*function can_path_execute_privileged_codeblock() - { - global $CONFIG; - - // Get a list of paths - $callstack = debug_backtrace(); - $call_paths = array(); - foreach ($callstack as $call) - $call_paths[] = sanitise_string($call['file']); - - // Get privileged paths - $paths = get_data("SELECT * from {$CONFIG->dbprefix}privileged_paths"); - - foreach ($paths as $p) - { - if (in_array( $p->path, $call_paths)) - return true; - } - - return false; - }*/ /**
* Get the full URL of the current page.
|