From 4a0550ccec3d77b2af34d77bc05f8eec27d81479 Mon Sep 17 00:00:00 2001 From: brettp Date: Mon, 6 Jul 2009 15:53:56 +0000 Subject: Refs #1089: Added [B] flag to rewrite for tags. Won't work until apache 2.2.12. Cleaned up some query code in pagehandler(). git-svn-id: https://code.elgg.org/elgg/trunk@3392 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/pagehandler.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'engine/lib/pagehandler.php') diff --git a/engine/lib/pagehandler.php b/engine/lib/pagehandler.php index cc347ed17..b993469d8 100644 --- a/engine/lib/pagehandler.php +++ b/engine/lib/pagehandler.php @@ -26,20 +26,15 @@ $query = parse_url($_SERVER['REQUEST_URI']); if (isset($query['query'])) { - $query = $query['query']; - $query = rawurldecode($query); - $query = explode('&',$query); - if (sizeof($query) > 0) { - foreach($query as $queryelement) { - $vals = explode('=',$queryelement, 2); - if (sizeof($vals) > 1) { - set_input(urldecode($vals[0]),urldecode($vals[1])); - } + parse_str($query['query'], $query_arr); + if (is_array($query_arr)) { + foreach($query_arr as $name => $val) { + set_input($name, $val); } } } - $page = explode('/',$page); + if (!isset($CONFIG->pagehandler) || empty($handler)) { $result = false; } else if (isset($CONFIG->pagehandler[$handler]) && is_callable($CONFIG->pagehandler[$handler])) { -- cgit v1.2.3