madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r22681: 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 14:14:30 UTC (rev 22680)
+++ trunk/cgi-bin/weblib.pl	2012-08-16 14:16:22 UTC (rev 22681)
@@ -1329,15 +1329,8 @@
         return;
     }
 
-    my $insert_head = !!$opts->{insert_head};
+    my $insert_head = $opts->{insert_head} ? 1 : 0;
 
-    if ($opts->{resource_package}) {
-        my $name = $opts->{resource_package};
-
-        return if $LJ::NAMED_NEED_RES{$name};
-        $LJ::NAMED_NEED_RES{$name} = 1;
-    }
-
     my @reskeys = ();
     foreach my $key (@keys) {
         my $reskey  = $key;
@@ -1360,13 +1353,11 @@
         $LJ::NEEDED_RES{$reskey} = $resopts;
     }
 
-    if (@reskeys) {
-        if ($insert_head) {
-            unshift @LJ::NEEDED_RES, @reskeys;
-        } else {
-            push @LJ::NEEDED_RES, @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