Henry Lyne (henrylyne) wrote in changelog,
Henry Lyne
henrylyne
changelog

[livejournal] r14927: LJSV-512: Fix rendering on drop-down FAQ...

Committer: henrylyne
LJSV-512: Fix rendering on drop-down FAQ list.

U   trunk/htdocs/support/see_request.bml
Modified: trunk/htdocs/support/see_request.bml
===================================================================
--- trunk/htdocs/support/see_request.bml	2009-02-24 11:01:31 UTC (rev 14926)
+++ trunk/htdocs/support/see_request.bml	2009-02-24 18:38:50 UTC (rev 14927)
@@ -204,6 +204,20 @@
 
     my $email = $sp->{'reqemail'};
 
+    my $user;
+    my $user_url;
+
+    # Get remote username and journal URL, or example user's username and
+    # journal URL
+    if ($remote) {
+        $user = $remote->user;
+        $user_url = $remote->journal_base;
+    } else {
+        my $u = LJ::load_user($LJ::EXAMPLE_USER_ACCOUNT);
+        $user = $u ? $u->user : "<b>[Unknown or undefined example username]</b>";
+        $user_url = $u ? $u->journal_base : "<b>[Unknown or undefined example username]</b>";
+    }
+
     my $u;
     my $clusterdown = 0;
     if ($sp->{'reqtype'} eq "user" && $sp->{'requserid'}) {
@@ -729,7 +743,9 @@
                                grep { $faqq{$_}->{'faqcat'} eq $faqcat } keys %faqq)
             {
                 next unless ($faqq{$faqid}->{'question'});
-                my $q = "... $faqq{$faqid}->{'question'}";
+                my $f = LJ::Faq->load($faqid, lang => BML::get_language());
+                $f->render_in_place({user => $user, url => $user_url});
+                my $q = "... " . $f->question_html;
                 $q =~ s/^\s+//;
                 $q =~ s/\s+$//;
                 $q =~ s/\n/ /g;

Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments