Carry over ?style=light/site/mine when tracking an entry or comment.

        Patch by kareila. 

diffs (39 lines):

diff -r 306e22f2aafb -r eea9d8e416c1 htdocs/manage/subscriptions/comments.bml
--- a/htdocs/manage/subscriptions/comments.bml  Thu Jul 08 16:07:29 2010 +0800
+++ b/htdocs/manage/subscriptions/comments.bml  Thu Jul 08 16:37:08 2010 +0800
@@ -103,11 +103,15 @@ body<=
                                      },
                       ];
 
+    my $referer = BML::get_client_header('Referer');
+    my ( $style ) = ( $referer =~ /\b(style=\w+)/ );
+    $style = LJ::viewing_style_args( split( /=/, $style ) );
+
     return LJ::subscribe_interface(
                                    $remote,
                                    categories => $categories,
                                    journal => $journal,
-                                   ret_url => ($can_watch ? $comment->url : 
$entry->url),
+                                   ret_url => ($can_watch ? $comment->url( 
$style ) : $entry->url . "?$style" ),
                                    default_selected_notifications => 
['LJ::NotificationMethod::Email'],
                                    post_to_settings_page => 1,
                                    );
diff -r 306e22f2aafb -r eea9d8e416c1 htdocs/manage/subscriptions/entry.bml
--- a/htdocs/manage/subscriptions/entry.bml     Thu Jul 08 16:07:29 2010 +0800
+++ b/htdocs/manage/subscriptions/entry.bml     Thu Jul 08 16:37:08 2010 +0800
@@ -88,10 +88,14 @@ body<=
             flags   => LJ::Subscription::TRACKING,
         );
 
+    my $referer = BML::get_client_header('Referer');
+    my ( $style ) = ( $referer =~ /\b(style=\w+)/ );
+    $style = LJ::viewing_style_args( split( /=/, $style ) );
+
     $body .= LJ::subscribe_interface( $remote,
                  journal      => $journal,
                  categories   => $categories,
-                 ret_url      => $entry->url,
+                 ret_url      => $entry->url . "?$style",
                  default_selected_notifications => 
['LJ::NotificationMethod::Email'],
                  post_to_settings_page => 1,
              );
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to