madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r23156: LJSUP-13883: Journal pages optimizaiton ...

Committer: sbelyaev
LJSUP-13883: Journal pages optimizaiton : stage 1
U   trunk/cgi-bin/taglib.pl
Modified: trunk/cgi-bin/taglib.pl
===================================================================
--- trunk/cgi-bin/taglib.pl	2012-10-16 16:15:21 UTC (rev 23155)
+++ trunk/cgi-bin/taglib.pl	2012-10-16 21:27:35 UTC (rev 23156)
@@ -667,8 +667,14 @@
     }
  
     ## generic case: if $remote can add tags to the entire journal of the entry
-    return 1 if LJ::Tags::can_add_tags($journal, $remote);
-    
+    my $can_add_entry_tags_key = '__can_add_entry_tags_' . $journal->userid;
+    return 1 if $remote->{$can_add_entry_tags_key};
+    unless (exists $remote->{$can_add_entry_tags_key}) {
+        my $result = LJ::Tags::can_add_tags($journal, $remote);
+        $remote->{$can_add_entry_tags_key} = $result;
+        return 1 if $result;
+    }
+
     ## not allowed.
     return;
 }

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