madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[ljcom] r12769: 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-16 16:15:58 UTC (rev 12768)
+++ trunk/cgi-bin/LJ/Hooks/PartnerSites.pm	2012-10-16 21:15:59 UTC (rev 12769)
@@ -12,7 +12,7 @@
     my $journal = $entry->journal;
 
     my $partner = $journal->{'__partner_journal'};
-    unless ($partner) {
+    unless ($partner && exists $journal->{'__partner_journal'}) {
         $partner = LJ::PartnerSite->find_by_journal_username( $journal->username );
         $journal->{'__partner_journal'} = $partner;
     }
@@ -37,7 +37,7 @@
     return if ! $u || $u->equals( LJ::get_remote() );
 
     my $partner = $u->{'__partner_journal'};
-    unless ($partner) {
+    unless ($partner && exists $u->{'__partner_journal'}) {
         $partner = LJ::PartnerSite->find_by_journal_username( $u->username );
         $u->{'__partner_journal'} = $partner;1
     }
@@ -53,7 +53,7 @@
     return if ! $u || $u->equals( LJ::get_remote() );
 
     my $partner = $u->{'__partner_journal'};
-    unless ($partner) {
+    unless ($partner && exists $u->{'__partner_journal'}) {
         $partner = LJ::PartnerSite->find_by_journal_username( $u->username );
         $u->{'__partner_journal'} = $partner;
     }
@@ -69,7 +69,7 @@
     return if ! $u || $u->equals( LJ::get_remote() );
 
     my $partner = $u->{'__partner_journal'};
-    unless ($partner) {
+    unless ($partner && exists $u->{'__partner_journal'}) {
         $partner = LJ::PartnerSite->find_by_journal_username( $u->username );
         $u->{'__partner_journal'} = $partner;
     }
@@ -85,7 +85,7 @@
     return if ! $u || $u->equals( LJ::get_remote() );
 
     my $partner = $u->{'__partner_journal'};
-    unless ($partner) {
+    unless ($partner && exists $u->{'__partner_journal'}) {
         $partner = LJ::PartnerSite->find_by_journal_username( $u->username );
         $u->{'__partner_journal'} = $partner;
     }
@@ -105,7 +105,7 @@
     return if ! $u || $u->equals( LJ::get_remote() );
 
     my $partner = $u->{'__partner_journal'};
-    unless ($partner) {
+    unless ($partner && exists $u->{'__partner_journal'}) {
         $partner = LJ::PartnerSite->find_by_journal_username( $u->username );
         $u->{'__partner_journal'} = $partner;
     }
@@ -125,7 +125,7 @@
     return if ! $u || $u->equals( LJ::get_remote() );
 
     my $partner = $u->{'__partner_journal'};
-    unless ($partner) {
+    unless ($partner && exists $u->{'__partner_journal'}) {
         $partner = LJ::PartnerSite->find_by_journal_username( $u->username );
         $u->{'__partner_journal'} = $partner;
     }
@@ -144,7 +144,7 @@
     return if ! $u || $u->equals( LJ::get_remote() );
 
     my $partner = $u->{'__partner_journal'};
-    unless ($partner) {
+    unless ($partner && exists $u->{'__partner_journal'}) {
         $partner = LJ::PartnerSite->find_by_journal_username( $u->username );
         $u->{'__partner_journal'} = $partner;
     }
@@ -168,7 +168,7 @@
     return if ! $u || $u->equals( LJ::get_remote() );
 
     my $partner = $u->{'__partner_journal'};
-    unless ($partner) {
+    unless ($partner && exists $u->{'__partner_journal'}) {
         $partner = LJ::PartnerSite->find_by_journal_username( $u->username );
         $u->{'__partner_journal'} = $partner;
     }
@@ -187,7 +187,7 @@
     return unless $u;
 
     my $partner = $u->{'__partner_journal'};
-    unless ($partner) {
+    unless ($partner && exists $u->{'__partner_journal'}) {
         $partner = LJ::PartnerSite->find_by_journal_username( $u->username );
         $u->{'__partner_journal'} = $partner;
     }
@@ -204,7 +204,7 @@
     return unless $link;
 
     my $partner = $u->{'__partner_journal'};
-    unless ($partner) {
+    unless ($partner && exists $u->{'__partner_journal'}) {
         $partner = LJ::PartnerSite->find_by_journal_username( $u->username );
         $u->{'__partner_journal'} = $partner;
     }

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