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

[ljcom] r11054: 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/Dystopia.pm
Modified: trunk/cgi-bin/LJ/SiteScheme/Dystopia.pm
===================================================================
--- trunk/cgi-bin/LJ/SiteScheme/Dystopia.pm	2011-09-29 05:41:20 UTC (rev 11053)
+++ trunk/cgi-bin/LJ/SiteScheme/Dystopia.pm	2011-09-30 02:21:56 UTC (rev 11054)
@@ -28,9 +28,11 @@
     }
 
     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 $show_lang_map = !LJ::Request->cookie('langpref');

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