fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-12-05 01:10 pm

[dw-free] Revamp /update

[commit: http://hg.dwscoalition.org/dw-free/rev/19ee4d760084]

http://bugs.dwscoalition.org/show_bug.cgi?id=2524

Use LJ::create_url() -- cleaner.

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/DW/Controller/Entry.pm
--------------------------------------------------------------------------------
diff -r c03a927d8c0b -r 19ee4d760084 cgi-bin/DW/Controller/Entry.pm
--- a/cgi-bin/DW/Controller/Entry.pm	Mon Dec 05 21:03:52 2011 +0800
+++ b/cgi-bin/DW/Controller/Entry.pm	Mon Dec 05 21:10:12 2011 +0800
@@ -52,7 +52,7 @@
 # redirect to app-space
 sub _user_to_app_role {
     my ( $path ) = @_;
-    return DW::Request->get->redirect( "$LJ::SITEROOT$path" );
+    return DW::Request->get->redirect( LJ::create_url( $path, host => $LJ::DOMAIN_WEB ) );
 }
 
 sub _new_handler_userspace { return _user_to_app_role( "/entry/$_[0]->{username}/new" ) }
--------------------------------------------------------------------------------