ssafronova (ssafronova) wrote in changelog,
ssafronova
ssafronova
changelog

[livejournal] r18033: LJSUP-7528: prepare current entry URL fo...

Committer: ssafronova
LJSUP-7528: prepare current entry URL for JS
U   trunk/cgi-bin/LJ/User.pm
U   trunk/cgi-bin/weblib.pl
Modified: trunk/cgi-bin/LJ/User.pm
===================================================================
--- trunk/cgi-bin/LJ/User.pm	2011-01-17 09:50:05 UTC (rev 18032)
+++ trunk/cgi-bin/LJ/User.pm	2011-01-17 11:06:29 UTC (rev 18033)
@@ -8867,7 +8867,7 @@
         return "<h1>Error</h1>No such user <b>$user</b>";
     }
     LJ::set_active_journal($u);
-    LJ::Request->notes('ljentry' => $opts->{'ljentry'});
+    LJ::Request->notes('ljentry' => $opts->{'ljentry'}->url) if $opts->{'ljentry'};
 
     # S1 style hashref.  won't be loaded now necessarily,
     # only if via customview.

Modified: trunk/cgi-bin/weblib.pl
===================================================================
--- trunk/cgi-bin/weblib.pl	2011-01-17 09:50:05 UTC (rev 18032)
+++ trunk/cgi-bin/weblib.pl	2011-01-17 11:06:29 UTC (rev 18033)
@@ -1348,14 +1348,14 @@
 
     my $default_copyright = $remote ? ($remote->prop("default_copyright") || 'P') : 'P';
 
-    my $ljentry = LJ::Request->notes('ljentry');
+    my $ljentry = LJ::Request->notes('ljentry') || ''; # url
     my %site = (
                 imgprefix => "$imgprefix",
                 siteroot => "$siteroot",
                 statprefix => "$statprefix",
                 currentJournalBase => "$journal_base",
                 currentJournal => "$journal",
-                currentEntry => ($ljentry ? $ljentry->url : ''),
+                currentEntry => $ljentry,
                 has_remote => $hasremote,
                 remote_can_track_threads => $remote && $remote->get_cap('track_thread'),
                 remote_is_suspended => $remote_is_suspended,

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