[dw-free] Include entry subject line in Take a look at this Dreamwidth entry
[commit: http://hg.dwscoalition.org/dw-free/rev/f50a0695c16f]
http://bugs.dwscoalition.org/show_bug.cgi?id=3894
"Take a look at this Dreamwidth entry" => "Take a look at this Dreamwidth
entry: subject goes here" if the entry has a subject.
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3894
"Take a look at this Dreamwidth entry" => "Take a look at this Dreamwidth
entry: subject goes here" if the entry has a subject.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- htdocs/tools/tellafriend.bml
- htdocs/tools/tellafriend.bml.text
-------------------------------------------------------------------------------- diff -r b53b65e17a12 -r f50a0695c16f htdocs/tools/tellafriend.bml --- a/htdocs/tools/tellafriend.bml Fri Nov 18 16:24:25 2011 +0800 +++ b/htdocs/tools/tellafriend.bml Mon Nov 21 17:05:20 2011 +0800 @@ -153,8 +153,6 @@ my $ditemid = $itemid; my $uj; - $subject = BML::ml( ".email.subject.entry", { sitenameshort => $LJ::SITENAMESHORT } ); - $itemid = int($itemid / 256); $uj = LJ::load_user($journal); @@ -162,7 +160,7 @@ my $entry = LJ::Entry->new($uj->{'userid'}, jitemid => $itemid); - my $subject = $entry->subject_text; + my $entry_subject = $entry->subject_text; my $pu = $entry->poster; my $url = $entry->url; @@ -182,8 +180,13 @@ } $msg .= BML::ml( ".email.body", { user => $u->{'user'}, sitenameshort => $LJ::SITENAMESHORT } ); - $msg .= BML::ml( ".email.sharedentry.title" ) . " $subject\n" if $subject; + $msg .= BML::ml( ".email.sharedentry.title" ) . " $entry_subject\n" if $entry_subject; $msg .= BML::ml( ".email.sharedentry.url" ) . " $url "; + + # email subject + $subject = $entry_subject + ? BML::ml( ".email.subject.entryhassubject", { sitenameshort => $LJ::SITENAMESHORT, subject => $entry_subject } ) + : BML::ml( ".email.subject.entrynosubject", { sitenameshort => $LJ::SITENAMESHORT } ); } if ($GET{'user'} =~ /^\w{1,15}$/) { diff -r b53b65e17a12 -r f50a0695c16f htdocs/tools/tellafriend.bml.text --- a/htdocs/tools/tellafriend.bml.text Fri Nov 18 16:24:25 2011 +0800 +++ b/htdocs/tools/tellafriend.bml.text Mon Nov 21 17:05:20 2011 +0800 @@ -42,7 +42,9 @@ .email.sharedentry.url=URL: -.email.subject.entry=Take a look at this [[sitenameshort]] entry +.email.subject.entryhassubject=Take a look at this [[sitenameshort]] entry: [[subject]] + +.email.subject.entrynosubject=Take a look at this [[sitenameshort]] entry .email.subject.journal=Take a look at this journal --------------------------------------------------------------------------------
no subject
no subject
no subject