Fix style=mine/style=light in generated links.
Patch by yvi.
diffs (36 lines):
diff -r 5f3e59144268 -r f92bdbc5f35a htdocs/talkpost.bml
--- a/htdocs/talkpost.bml Mon Jul 20 10:01:48 2009 -0500
+++ b/htdocs/talkpost.bml Mon Jul 20 15:46:42 2009 +0000
@@ -112,8 +112,12 @@ body<=
my $itemid = $init->{'itemid'};
- my $stylemine = $init->{'style'} eq "mine" ? "style=mine" : "";
- my $formatlight = $GET{'format'} eq 'light' ? 'format=light' : '';
+ my $formatlight = ( ( $GET{format} eq 'light' ) || ( $GET{style} eq
'light' ) ) ? 'style=light' : '';
+ my $stylemine = "";
+
+ # FIXME: $init->{style} returns 'mine' even if style=format is used
instead of style=mine
+ # if that is fixed, this can be adjusted
+ $stylemine = ( $init->{style} eq "mine" ) ? "style=mine" : "" unless
$formatlight;
## load the journal item
my $item = LJ::Talk::get_journal_item($u, $itemid);
diff -r 5f3e59144268 -r f92bdbc5f35a htdocs/talkread.bml
--- a/htdocs/talkread.bml Mon Jul 20 10:01:48 2009 -0500
+++ b/htdocs/talkread.bml Mon Jul 20 15:46:42 2009 +0000
@@ -100,8 +100,12 @@ body<=
$itemid = $init->{'itemid'}+0;
# Get format/style parameters to pass to the URL later
- my $stylemine = $init->{'style'} eq "mine" ? "style=mine" : "";
- my $formatlight = $GET{'format'} eq 'light' ? 'format=light' : '';
+ my $formatlight = ( ( $GET{format} eq 'light' ) || ( $GET{style} eq
'light' ) ) ? 'style=light' : '';
+ my $stylemine = "";
+
+ # FIXME: $init->{style} returns 'mine' even if style=format is used
instead of style=mine
+ # if that is fixed, this can be adjusted
+ $stylemine = ( $init->{style} eq "mine" ) ? "style=mine" : "" unless
$formatlight;
my $item = LJ::Talk::get_journal_item($u, $itemid);
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog