mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2010-05-02 12:12 am

[dw-free] Makes the default site scheme stick if user has chosen a different one

[commit: http://hg.dwscoalition.org/dw-free/rev/9712d8733e4f]

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

Fix issue with not deleting the site scheme cookie properly.

Patch by [personal profile] exor674.

Files modified:
  • cgi-bin/LJ/Setting/SiteScheme.pm
--------------------------------------------------------------------------------
diff -r 2e0690ee55e1 -r 9712d8733e4f cgi-bin/LJ/Setting/SiteScheme.pm
--- a/cgi-bin/LJ/Setting/SiteScheme.pm	Sun May 02 00:10:33 2010 +0000
+++ b/cgi-bin/LJ/Setting/SiteScheme.pm	Sun May 02 00:12:08 2010 +0000
@@ -102,7 +102,7 @@ sub save {
     # don't set cookie for default scheme
     if ($val eq $bml_schemes[0]->{scheme} && !$LJ::SAVE_SCHEME_EXPLICITLY) {
         $cval = "";
-        $r->delete_cookie( name => 'BMLschemepref' );
+        $r->delete_cookie( domain  => ".$LJ::DOMAIN", name => 'BMLschemepref' );
     }
 
     my $expires = undef;
--------------------------------------------------------------------------------