madeon (madeon) wrote in changelog,
madeon
madeon
changelog

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

Committer: sbelyaev
LJSUP-13883: Journal pages optimizaiton : stage 1
U   trunk/cgi-bin/LJ/Entry.pm
Modified: trunk/cgi-bin/LJ/Entry.pm
===================================================================
--- trunk/cgi-bin/LJ/Entry.pm	2012-10-12 15:36:42 UTC (rev 23129)
+++ trunk/cgi-bin/LJ/Entry.pm	2012-10-15 07:34:18 UTC (rev 23130)
@@ -270,7 +270,10 @@
 sub url {
     my $self = shift;
     my %opts = @_;
-    my %args = %opts; # used later
+    my $no_opts = !%opts;
+    return $self->{'__simple_url'} if $self->{'__simple_url'} && $no_opts;
+
+    my %args  = %opts;
     my $u    = $self->{u};
     my $view   = delete $opts{view};
     my $anchor = delete $opts{anchor};
@@ -301,6 +304,7 @@
         $url .= LJ::encode_url_string(\%args);
     }
     $url .= "#$anchor" if $anchor;
+    $self->{'__simple_url'} = $url if $no_opts;
     return $url;
 }
 

Tags: livejournal, 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