Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[livejournal] r19254: LJSUP-8984: Sort by poster - contextual ...

Committer: gariev
LJSUP-8984: Sort by poster - contextual popup
U   trunk/cgi-bin/weblib.pl
U   trunk/htdocs/tools/endpoints/ctxpopup.bml
Modified: trunk/cgi-bin/weblib.pl
===================================================================
--- trunk/cgi-bin/weblib.pl	2011-06-08 07:28:57 UTC (rev 19253)
+++ trunk/cgi-bin/weblib.pl	2011-06-08 07:32:23 UTC (rev 19254)
@@ -1393,6 +1393,11 @@
     # include standard JS info
     unless ( $only_needed ) {
         my $jsml_out = LJ::JSON->to_json(\%LJ::JSML);
+        my %journal_info;
+        if (my $journalu = LJ::get_active_journal()) {
+            %journal_info = $journalu->info_for_js;
+        }
+        my $journal_info_json = LJ::JSON->to_json(\%journal_info);
         $ret .= qq {
             <script type="text/javascript">
                 Site = window.Site || {};
@@ -1401,6 +1406,7 @@
                     var p = $site_params, i;
                     for (i in p) Site[i] = p[i];
                 })();
+                Site.current_journal = $journal_info_json;
            </script>
         };
     }

Modified: trunk/htdocs/tools/endpoints/ctxpopup.bml
===================================================================
--- trunk/htdocs/tools/endpoints/ctxpopup.bml	2011-06-08 07:28:57 UTC (rev 19253)
+++ trunk/htdocs/tools/endpoints/ctxpopup.bml	2011-06-08 07:32:23 UTC (rev 19254)
@@ -187,13 +187,6 @@
         }
     }
     
-    ## current journal info
-    my $journalu = LJ::get_active_journal();
-    if ($journalu) {
-        my %journal_info = $journalu->info_for_js;
-        $ret{active_journal} = \%journal_info;
-    }
-
     $ret{success} = 1;
     return LJ::JSON->to_json(\%ret);
 }

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