Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r20175: LJSUP-9743 (site schemes refactoring): d...

Committer: ailyin
LJSUP-9743 (site schemes refactoring): do not rely on autovivification letting us get away dereferencing undefs and make it do the right thing
U   trunk/cgi-bin/LJ/SiteScheme/Lynx.pm
Modified: trunk/cgi-bin/LJ/SiteScheme/Lynx.pm
===================================================================
--- trunk/cgi-bin/LJ/SiteScheme/Lynx.pm	2011-09-29 11:44:21 UTC (rev 20174)
+++ trunk/cgi-bin/LJ/SiteScheme/Lynx.pm	2011-09-30 02:21:19 UTC (rev 20175)
@@ -16,9 +16,11 @@
     my $remote = LJ::get_remote();
 
     my ( $parentcrumb_title, $parentcrumb_link ) = ( '', '' );
-    if ( LJ::get_active_crumb() ne '' ) {
-        my $parentcrumb = LJ::get_parent_crumb();
-        ( $parentcrumb_title, $parentcrumb_link ) = @$parentcrumb;
+    if ( LJ::get_active_crumb() ) {
+        my @path = LJ::get_crumb_path();
+        if ( my $parentcrumb = $path[-2] ) {
+            ( $parentcrumb_title, $parentcrumb_link ) = @$parentcrumb;
+        }
     }
 
     my $body_class = 'scheme-lynx ' . LJ::get_body_class_for_service_pages();

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