summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-01-21 02:45:08 -0500
committerEvan Prodromou <evan@controlyourself.ca>2009-01-21 02:45:08 -0500
commitaf554abcbc146bb44ba9783ac212fc537177442a (patch)
tree02a2210ddf37e38e95eb26f42dcf55b477941937
parent26652e92f2ef0cedda9823e17c81fc78be82fe9b (diff)
Fix redirect function
-rw-r--r--lib/util.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/util.php b/lib/util.php
index 7b30aeab4..e570b54f9 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1040,14 +1040,16 @@ function common_redirect($url, $code=307)
302 => "Found",
303 => "See Other",
307 => "Temporary Redirect");
+
header("Status: ${code} $status[$code]");
header("Location: $url");
- common_start_xml('a',
- '-//W3C//DTD XHTML 1.0 Strict//EN',
- 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd');
- common_element('a', array('href' => $url), $url);
- common_end_xml();
+ $xo = new XMLOutputter();
+ $xo->startXML('a',
+ '-//W3C//DTD XHTML 1.0 Strict//EN',
+ 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd');
+ $xo->output('a', array('href' => $url), $url);
+ $xo->endXML();
exit;
}