projects
/
quix0rs-gnu-social.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f82a3d
)
a little better query handling in redirect code
author
Evan Prodromou
<evan@controlyourself.ca>
Mon, 15 Jun 2009 23:51:49 +0000
(16:51 -0700)
committer
Evan Prodromou
<evan@controlyourself.ca>
Mon, 15 Jun 2009 23:51:49 +0000
(16:51 -0700)
classes/Status_network.php
patch
|
blob
|
history
diff --git
a/classes/Status_network.php
b/classes/Status_network.php
index 128721f41b10dd13dd95c74a1f570b103391bd1e..03e8f452598a2387ae9e422d3787c13248c5d9af 100644
(file)
--- a/
classes/Status_network.php
+++ b/
classes/Status_network.php
@@
-93,8
+93,19
@@
class Status_network extends DB_DataObject
function redirectToHostname()
{
$destination = 'http://'.$this->hostname;
- $destination .= $_SERVER['REQUEST_URI'].
- $_SERVER['QUERY_STRING'];
+ $destination .= $_SERVER['REQUEST_URI'];
+
+ $args = $_GET;
+
+ if (isset($args['p'])) {
+ unset($args['p']);
+ }
+
+ $query = http_build_query($args);
+
+ if (strlen($query) > 0) {
+ $destination .= '?' . $query;
+ }
$old = 'http'.
(($_SERVER['HTTPS'] == 'on') ? 'S' : '').