madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r22674: LJSUP-13301: Main page optimization

Committer: sbelyaev
LJSUP-13301: Main page optimization
U   trunk/cgi-bin/weblib.pl
Modified: trunk/cgi-bin/weblib.pl
===================================================================
--- trunk/cgi-bin/weblib.pl	2012-08-16 10:57:18 UTC (rev 22673)
+++ trunk/cgi-bin/weblib.pl	2012-08-16 12:12:29 UTC (rev 22674)
@@ -1355,16 +1355,18 @@
         die "Bogus reskey $reskey" unless $reskey =~ m!^(js|stc)/!;
 
         unless (exists $LJ::NEEDED_RES{$reskey}) {
-            push @reskeys => $reskey;
+            push @reskeys, $reskey;
         }
         $LJ::NEEDED_RES{$reskey} = $resopts;
     }
 
-    if ($insert_head) {
-        unshift @LJ::NEEDED_RES, @reskeys;
-    } else {
-        push @LJ::NEEDED_RES, @reskeys;
-    }
+    if (@reskeys) {
+        if ($insert_head) {
+            unshift @LJ::NEEDED_RES, @reskeys;
+        } else {
+            push @LJ::NEEDED_RES, @reskeys;
+        }
+    }   
 }
 
 sub include_raw  {

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