kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2010-03-31 02:43 am

[dw-free] Styles: redirect /tags to /tag

[commit: http://hg.dwscoalition.org/dw-free/rev/56ee98363f00]

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

Allow use of /tags in user space (redirects to /tag).

Patch by [personal profile] yvi.

Files modified:
  • cgi-bin/Apache/LiveJournal.pm
--------------------------------------------------------------------------------
diff -r e568ee8d1fd3 -r 56ee98363f00 cgi-bin/Apache/LiveJournal.pm
--- a/cgi-bin/Apache/LiveJournal.pm	Sun Mar 28 07:05:10 2010 -0700
+++ b/cgi-bin/Apache/LiveJournal.pm	Tue Mar 30 21:43:34 2010 -0500
@@ -659,6 +659,10 @@ sub trans
         my $ret = LJ::URI->handle($uuri, $r);
         $ret = DW::Routing->call( username => $user ) unless defined $ret;
         return $ret if defined $ret;
+
+        if ($uuri =~ m#tags(.*)#) {
+            return redir($r, "/tag$1");
+        }
 
         if ($uuri eq "/__setdomsess") {
             return redir($r, LJ::Session->setdomsess_handler($r));
--------------------------------------------------------------------------------
msilverstar: (corset)

[personal profile] msilverstar 2010-04-04 05:14 pm (UTC)(link)
Oh yay! Redirecting from the linguistically correct form is very helpful!