Fix redirect function
This commit is contained in:
parent
26652e92f2
commit
af554abcbc
12
lib/util.php
12
lib/util.php
|
@ -1040,14 +1040,16 @@ function common_redirect($url, $code=307)
|
||||||
302 => "Found",
|
302 => "Found",
|
||||||
303 => "See Other",
|
303 => "See Other",
|
||||||
307 => "Temporary Redirect");
|
307 => "Temporary Redirect");
|
||||||
|
|
||||||
header("Status: ${code} $status[$code]");
|
header("Status: ${code} $status[$code]");
|
||||||
header("Location: $url");
|
header("Location: $url");
|
||||||
|
|
||||||
common_start_xml('a',
|
$xo = new XMLOutputter();
|
||||||
'-//W3C//DTD XHTML 1.0 Strict//EN',
|
$xo->startXML('a',
|
||||||
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd');
|
'-//W3C//DTD XHTML 1.0 Strict//EN',
|
||||||
common_element('a', array('href' => $url), $url);
|
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd');
|
||||||
common_end_xml();
|
$xo->output('a', array('href' => $url), $url);
|
||||||
|
$xo->endXML();
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user