madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[ljcom] r12754: LJSUP-13883: Journal pages optimizaiton ...

Committer: sbelyaev
LJSUP-13883: Journal pages optimizaiton : stage 1
U   trunk/cgi-bin/LJ/Hooks/PartnerSites.pm
Modified: trunk/cgi-bin/LJ/Hooks/PartnerSites.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/PartnerSites.pm	2012-10-15 08:23:00 UTC (rev 12753)
+++ trunk/cgi-bin/LJ/Hooks/PartnerSites.pm	2012-10-15 08:32:02 UTC (rev 12754)
@@ -66,7 +66,11 @@
 
     return if ! $u || $u->equals( LJ::get_remote() );
 
-    my $partner = LJ::PartnerSite->find_by_journal_username( $u->username );
+    my $partner = $u->{'__partner_journal'};
+    unless ($partner) {
+        $partner = LJ::PartnerSite->find_by_journal_username( $u->username );
+    }
+
     return unless $partner && $partner->overrides->{'journal_url'};
 
     $$journal_url_ref = $partner->overrides->{'journal_url'};
@@ -83,7 +87,10 @@
 
     return if ! $u || $u->equals( LJ::get_remote() );
 
-    my $partner = LJ::PartnerSite->find_by_journal_username( $u->username );
+    my $partner = $u->{'__partner_journal'};
+    unless ($partner) {
+        $partner = LJ::PartnerSite->find_by_journal_username( $u->username );
+    }
     return unless $partner && $partner->overrides->{'entry_url'};
 
     my $docid = $partner->docid_from_entry($entry);
@@ -112,7 +119,11 @@
 
     return if ! $u || $u->equals( LJ::get_remote() );
 
-    my $partner = LJ::PartnerSite->find_by_journal_username( $u->username );
+    my $partner = $u->{'__partner_journal'};
+    unless ($partner) {
+        $partner = LJ::PartnerSite->find_by_journal_username( $u->username );
+    }
+
     return unless $partner && $partner->overrides->{'reply_url'};
 
     my $docid = $partner->docid_from_entry($entry);

Tags: ljcom, madeon, pm, 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