aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-07-06 15:53:56 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-07-06 15:53:56 +0000
commit4a0550ccec3d77b2af34d77bc05f8eec27d81479 (patch)
tree7a63eb47aa9859bad671d079f187351611f18d78
parent9c39d755096d01c9653a74a383a796c19c75ddb7 (diff)
downloadelgg-4a0550ccec3d77b2af34d77bc05f8eec27d81479.tar.gz
elgg-4a0550ccec3d77b2af34d77bc05f8eec27d81479.tar.bz2
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
-rw-r--r--engine/lib/pagehandler.php15
-rw-r--r--htaccess_dist4
2 files changed, 7 insertions, 12 deletions
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])) {
diff --git a/htaccess_dist b/htaccess_dist
index eb9b3afcc..00c29ab79 100644
--- a/htaccess_dist
+++ b/htaccess_dist
@@ -130,6 +130,6 @@ RewriteRule ^pg\/([A-Za-z0-9\_\-]+)$ engine/handlers/pagehandler.php?handler=$1
RewriteRule xml-rpc.php engine/handlers/xml-rpc_handler.php
RewriteRule mt/mt-xmlrpc.cgi engine/handlers/xml-rpc_handler.php
-RewriteRule ^tag/(.+)/?$ engine/handlers/pagehandler.php?handler=search&page=$1
+RewriteRule ^tag/(.+)/?$ engine/handlers/pagehandler.php?handler=search&page=$1 [B]
-</IfModule> \ No newline at end of file
+</IfModule>