madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r22627: LJSUP-13275: Ability to get js template ...

Committer: sbelyaev
LJSUP-13275: Ability to get js template from (l-)stat
U   trunk/cgi-bin/weblib.pl
Modified: trunk/cgi-bin/weblib.pl
===================================================================
--- trunk/cgi-bin/weblib.pl	2012-08-13 10:42:10 UTC (rev 22626)
+++ trunk/cgi-bin/weblib.pl	2012-08-13 11:13:43 UTC (rev 22627)
@@ -1411,7 +1411,7 @@
     if ( $opts->{'only_tmpl'} ) {
         my %loaded;
         foreach my $template (@LJ::SITEWIDE_TEMPLATES, @LJ::INCLUDE_TEMPLATE) {
-            if (LJ::is_enabled('template_from_stat')) {
+            if (LJ::is_enabled('templates_from_stat')) {
                 # Create template id
                 my $key = $template;
                 $key =~ s{(?<!\\)/} {-}g;
@@ -1420,7 +1420,7 @@
                 my $stat_prefix = 'l-stat';
                 my $debug_data  = '';
 
-                if ($LJ::IS_DEV_SERVER) {
+                if ($LJ::IS_DEV_SERVER || $LJ::CURRENT_VERSION eq 'trunk') {
                     $stat_prefix =  'stat';
 
                     $debug_data = sprintf q{
@@ -1429,7 +1429,7 @@
                         $template, $LJ::TEMPLATE_TRANSLATION;
                 }
 
-                my $address = "http://$stat_prefix.$LJ::DOMAIN/__tmpl/$template";
+                my $address = "http://$stat_prefix.$LJ::DOMAIN/__tmpl/$template?v=" . $LJ::CURRENT_VERSION;
                 $ret .= sprintf q{<script type="text/plain" id="%s" src="%s" %s>}, 
                         $key, $address, $debug_data;
                 $ret .= '</script>';

Tags: livejournal, madeon, pl, sbelyaev
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