Fix error with previewing when the user has a custom style based on 
core1.

        Patch by afuna. 

diffs (20 lines):

diff -r 47d20be3e6da -r 374d3d6141ad cgi-bin/LJ/S2Theme.pm
--- a/cgi-bin/LJ/S2Theme.pm     Fri Jun 12 14:47:33 2009 +0000
+++ b/cgi-bin/LJ/S2Theme.pm     Fri Jun 12 17:48:19 2009 +0000
@@ -614,9 +614,14 @@ sub get_preview_styleid {
     my %style = LJ::S2::get_style($u);
     my $i18n_layer = $self->get_custom_i18n_layer_for_theme($u);
     my $user_layer = $self->get_custom_user_layer_for_theme($u);
+    
+    # for the i18nc layer, match the user's preferences if they're not 
switching cores
+    # if they are switching cores, we don't know what the equivalent should be
+    my $i18nc_layer = ( $self->coreid == $style{core} ) ? $style{i18nc} : 
undef;
+    
     my %layers = (
-        core   => $style{core},
-        i18nc  => $style{i18nc},
+        core   => $self->coreid,
+        i18nc  => $i18nc_layer,
         layout => $self->layoutid,
         i18n   => $i18n_layer,
         theme  => $self->themeid,
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to