diff options
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/lib/util.php b/lib/util.php index ed7284183..4d4a3b20f 100644 --- a/lib/util.php +++ b/lib/util.php @@ -915,6 +915,24 @@ function common_fancy_url($action, $args=null) } else { return common_path('main/sup'); } + case 'newgroup': + return common_path('group/new'); + case 'showgroup': + return common_path('group/'.$args['nickname']); + case 'editgroup': + return common_path('group/'.$args['nickname'].'/edit'); + case 'joingroup': + return common_path('group/'.$args['nickname'].'/join'); + case 'leavegroup': + return common_path('group/'.$args['nickname'].'/leave'); + case 'groupbyid': + return common_path('group/'.$args['id'].'/id'); + case 'grouprss': + return common_path('group/'.$args['nickname'].'/rss'); + case 'groupmembers': + return common_path('group/'.$args['nickname'].'/members'); + case 'usergroups': + return common_path($args['nickname'].'/groups'); default: return common_simple_url($action, $args); } @@ -1026,14 +1044,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; } |