From 89724423660249f9fed7398eeb4d95dfb295c809 Mon Sep 17 00:00:00 2001 From: Bogdanova Olga Date: Fri, 28 Jan 2022 09:50:50 +0300 Subject: [PATCH] Issues-674: fix a breadcrumb for self-service --- .../vanilla/controllers/class.vanillacontroller.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/vanilla/applications/vanilla/controllers/class.vanillacontroller.php b/vanilla/applications/vanilla/controllers/class.vanillacontroller.php index e700636..881616e 100644 --- a/vanilla/applications/vanilla/controllers/class.vanillacontroller.php +++ b/vanilla/applications/vanilla/controllers/class.vanillacontroller.php @@ -96,15 +96,13 @@ protected function buildBreadcrumbs($CategoryID) { $ancestors = CategoryModel::getAncestors($CategoryID); $parentCategoryID = val('ParentCategoryID', $Category); // FIX https://github.com/topcoder-platform/forums/issues/648 - $showFullBreadcrumbs = true; $this->EventArguments['ShowFullBreadcrumbs'] = & $showFullBreadcrumbs; $this->fireEvent('BeforeBuildBreadcrumbs'); - // getIncomingValue('embed_type') == 'mfe' if(!$showFullBreadcrumbs) { $temp = []; if(val('GroupID', $Category) > 0) { - $GroupCategoryID = $this->data('Breadcrumbs.Options.GroupCategoryID'); + $GroupCategoryID = $this->data('BreadcrumbsOptionsGroupCategoryID'); foreach ($ancestors as $id => $ancestor) { if($GroupCategoryID == $ancestor['CategoryID']) {// root category for a group array_push($temp, ['Name' => $ancestor['Name'], 'Url'=>'/group/'.$ancestor['GroupID']]); @@ -113,9 +111,6 @@ protected function buildBreadcrumbs($CategoryID) { } } } - if(count($temp) == 1) { - return []; - } return $temp; } else { @@ -123,7 +118,7 @@ protected function buildBreadcrumbs($CategoryID) { $challenge = $this->data('Challenge'); $track = $challenge ? $challenge['Track'] : false; $temp = []; - $GroupCategoryID = $this->data('Breadcrumbs.Options.GroupCategoryID'); + $GroupCategoryID = $this->data('BreadcrumbsOptionsGroupCategoryID'); foreach ($ancestors as $id => $ancestor) { if ($ancestor['GroupID'] > 0) { if ($GroupCategoryID == $ancestor['CategoryID']) {// root category for a group