wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r23085: LJSUP-13588. Add Site.membership flag to...

Committer: wisest-owl
LJSUP-13588. Add Site.membership flag to JS

U   trunk/cgi-bin/weblib.pl
Modified: trunk/cgi-bin/weblib.pl
===================================================================
--- trunk/cgi-bin/weblib.pl	2012-10-10 07:50:56 UTC (rev 23084)
+++ trunk/cgi-bin/weblib.pl	2012-10-10 09:05:38 UTC (rev 23085)
@@ -1626,6 +1626,12 @@
         # LJSUP-12854: Fix escape for Site object
         $jsml_out  =~ s{(?<=</s)(?=cript)} {"+"}g;
         $jsvar_out =~ s{(?<=</s)(?=cript)} {"+"}g;
+        
+        my $comm_access = "";
+        if ($ju && $ju->is_community) {
+            my @c_acc = LJ::get_comm_settings ($ju);
+            $comm_access = "Site.membership = '$c_acc[0]';" if scalar @c_acc;
+        }
 
         $ret_js .= qq {
             <script type="text/javascript">
@@ -1638,6 +1644,7 @@
                 })();
                 Site.current_journal = $journal_info_json;
                 Site.version = '$site_version';
+                $comm_access
            </script>
         };
 

Tags: livejournal, pl, wisest-owl
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