[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 thingU 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');
