]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix redirect function
authorEvan Prodromou <evan@controlyourself.ca>
Wed, 21 Jan 2009 07:45:08 +0000 (02:45 -0500)
committerEvan Prodromou <evan@controlyourself.ca>
Wed, 21 Jan 2009 07:45:08 +0000 (02:45 -0500)
lib/util.php

index 7b30aeab4477248d84650d7ab570e34ae4898791..e570b54f94eb36a75b68940aec02e321e746c8d5 100644 (file)
@@ -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;
 }