changelog_bot (changelog_bot) wrote in changelog,
changelog_bot
changelog_bot
changelog

[livejournal] r18771: LJINT-416: fixed

Committer: emazin
LJINT-416: fixed
U   trunk/htdocs/gadgets/logcom.bml
U   trunk/htdocs/talkpost_do.bml
Modified: trunk/htdocs/gadgets/logcom.bml
===================================================================
--- trunk/htdocs/gadgets/logcom.bml	2011-04-01 09:37:26 UTC (rev 18770)
+++ trunk/htdocs/gadgets/logcom.bml	2011-04-01 09:43:48 UTC (rev 18771)
@@ -16,7 +16,7 @@
     my $domain  = LJ::Request->get_param('domain');
 
     ## convert remote-site key to lj.com's community
-    my $partner = LJ::PartnerSite->find_by_api_key($api_key);
+    my $partner = LJ::PartnerSite->find_by_journal_username('kommersant_id');#LJ::PartnerSite->find_by_api_key($api_key);
     return 'unknown key'
         unless $partner;
 
@@ -65,6 +65,14 @@
 
         my $ljuser_html = $partner->ljuser_html($remote);
 
+        my $resources_html = $partner->partner_resources;
+        
+        if ($resources_html) {
+            LJ::need_res( { clean_list => 1 } );
+            LJ::need_res( @{ $partner->{resources} } );
+        }
+        $resources_html .= LJ::res_includes();
+
         return
             LJ::Talk::talkform({
                 'embedable_form'    => 1,
@@ -78,8 +86,7 @@
                 'ditemid'           => $entry->ditemid,
                 'replyto'           => int ($replyto / 256),
 
-                'resources_html'    => $partner->resources_html
-                                    || LJ::res_includes(),
+                'resources_html'    => $resources_html,
             });
     } else {
         ## display login widget
@@ -95,12 +102,18 @@
         my $w = LJ::Widget::LoginMulti->new;
         $w->{'no_container_div'} = 1;
 
+        my $resources_html = $partner->partner_resources;
+
+        if ($resources_html) {
+            LJ::need_res( { clean_list => 1 } );
+            LJ::need_res( @{ $partner->{resources} } );
+        }
+        $resources_html .= LJ::res_includes();
+
         return $w->render(
             'embedded'          => 1,
             'js_check_domain'   => $js_check_domain,
-            'resources_html'    => $partner->resources_html
-                                || LJ::res_includes(),
-
+            'resources_html'    => $resources_html,
             'forwhat'           => 'external',
             'thispage'          => $thispage,
             'lj_auth'           => 1,

Modified: trunk/htdocs/talkpost_do.bml
===================================================================
--- trunk/htdocs/talkpost_do.bml	2011-04-01 09:37:26 UTC (rev 18770)
+++ trunk/htdocs/talkpost_do.bml	2011-04-01 09:43:48 UTC (rev 18771)
@@ -206,9 +206,11 @@
 
             $partner->request_logcom_resources;
 
+            $talkform_opts->{'resources_html'} = $partner->partner_resources;
 
-            $talkform_opts->{'resources_html'} = $partner->resources_html
-                                              || LJ::res_includes();
+            LJ::need_res( { clean_list => 1 } );
+            LJ::need_res( @{ $partner->{resources} } );
+            $talkform_opts->{'resources_html'} .= LJ::res_includes({only_needed => 1}); 
 
             $talkform_opts->{'partner_domain'} = $POST{'partner_domain'};
         }

Tags: bml, changelog_bot, livejournal
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