diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2011-10-30 12:01:42 -0700 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2011-10-30 12:01:42 -0700 |
commit | 9b20ccfd7e19ff8624db6132a17c81def33d8022 (patch) | |
tree | 27fe8dacb305fc0e2343e43f2d89202d60894cd8 /engine/lib | |
parent | 3f9abf384029bf3fc899be2eead4e3121d20e331 (diff) | |
parent | edec092e1aa616561063214a66620f9b6852875d (diff) | |
download | elgg-9b20ccfd7e19ff8624db6132a17c81def33d8022.tar.gz elgg-9b20ccfd7e19ff8624db6132a17c81def33d8022.tar.bz2 |
Merge branch 'master' of github.com:Elgg/Elgg
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/configuration.php | 2 | ||||
-rw-r--r-- | engine/lib/input.php | 34 | ||||
-rw-r--r-- | engine/lib/output.php | 2 | ||||
-rw-r--r-- | engine/lib/pageowner.php | 3 |
4 files changed, 20 insertions, 21 deletions
diff --git a/engine/lib/configuration.php b/engine/lib/configuration.php index c6db515e8..615063f3d 100644 --- a/engine/lib/configuration.php +++ b/engine/lib/configuration.php @@ -572,6 +572,8 @@ function set_default_config() { } } + $CONFIG->context = array(); + return true; } diff --git a/engine/lib/input.php b/engine/lib/input.php index 4900817a5..2f68195f2 100644 --- a/engine/lib/input.php +++ b/engine/lib/input.php @@ -8,7 +8,7 @@ */ /** - * Get some input from variables passed on the GET or POST line. + * Get some input from variables passed submitted through GET or POST. * * If using any data obtained from get_input() in a web page, please be aware that * it is a possible vector for a reflected XSS attack. If you are expecting an @@ -18,41 +18,41 @@ * because of the filtering done in htmlawed from the filter_tags call. * @todo Is this ^ still true? * - * @param string $variable The variable we want to return. + * @param string $variable The variable name we want. * @param mixed $default A default value for the variable if it is not found. - * @param bool $filter_result If true then the result is filtered for bad tags. + * @param bool $filter_result If true, then the result is filtered for bad tags. * - * @return string + * @return mixed */ function get_input($variable, $default = NULL, $filter_result = TRUE) { global $CONFIG; + $result = $default; + + elgg_push_context('input'); + if (isset($CONFIG->input[$variable])) { - $var = $CONFIG->input[$variable]; + $result = $CONFIG->input[$variable]; if ($filter_result) { - $var = filter_tags($var); + $result = filter_tags($result); } - - return $var; - } - - if (isset($_REQUEST[$variable])) { + } elseif (isset($_REQUEST[$variable])) { if (is_array($_REQUEST[$variable])) { - $var = $_REQUEST[$variable]; + $result = $_REQUEST[$variable]; } else { - $var = trim($_REQUEST[$variable]); + $result = trim($_REQUEST[$variable]); } if ($filter_result) { - $var = filter_tags($var); + $result = filter_tags($result); } - - return $var; } - return $default; + elgg_pop_context(); + + return $result; } /** diff --git a/engine/lib/output.php b/engine/lib/output.php index 37ebbb4aa..60bcc72cd 100644 --- a/engine/lib/output.php +++ b/engine/lib/output.php @@ -34,7 +34,7 @@ function parse_urls($text) { $url = trim($url, \'.\'); } $urltext = str_replace("/", "/<wbr />", $url); - return "<a href=\"$url\" style=\"text-decoration:underline;\">$urltext</a>$period"; + return "<a href=\"$url\">$urltext</a>$period"; ' ), $text); diff --git a/engine/lib/pageowner.php b/engine/lib/pageowner.php index d1010fda6..9d41d74c1 100644 --- a/engine/lib/pageowner.php +++ b/engine/lib/pageowner.php @@ -263,12 +263,9 @@ function elgg_in_context($context) { * @access private */ function page_owner_boot() { - global $CONFIG; elgg_register_plugin_hook_handler('page_owner', 'system', 'default_page_owner_handler'); - $CONFIG->context = array(); - // Bootstrap the context stack by setting its first entry to the handler. // This is the first segment of the URL and the handler is set by the rewrite rules. // @todo this does not work for actions |