aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/input.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/input.php')
-rw-r--r--engine/lib/input.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/engine/lib/input.php b/engine/lib/input.php
index f59061312..27204682f 100644
--- a/engine/lib/input.php
+++ b/engine/lib/input.php
@@ -167,6 +167,23 @@ function autop($pee, $br = 1) {
}
/**
+ * Examins $_SERVER['REQUEST_URI'] and set_input()s on each.
+ * Required if the params are sent as GET and not forwarded by mod_rewrite.
+ *
+ * @return bool on success
+ */
+function elgg_set_input_from_uri() {
+ $query = parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY);
+ parse_str($query, $query_arr);
+
+ if (is_array($query_arr)) {
+ foreach($query_arr as $name => $val) {
+ set_input($name, $val);
+ }
+ }
+}
+
+/**
* Page handler for autocomplete endpoint.
*
* @param $page