Skip to content

Commit 380f599

Browse files
authored
Merge pull request #675 from topcoder-platform/issues-674
Issues-674: fix a breadcrumb for self-service
2 parents facb945 + 8972442 commit 380f599

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

vanilla/applications/vanilla/controllers/class.vanillacontroller.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,13 @@ protected function buildBreadcrumbs($CategoryID) {
9696
$ancestors = CategoryModel::getAncestors($CategoryID);
9797
$parentCategoryID = val('ParentCategoryID', $Category);
9898
// FIX https://github.com/topcoder-platform/forums/issues/648
99-
10099
$showFullBreadcrumbs = true;
101100
$this->EventArguments['ShowFullBreadcrumbs'] = & $showFullBreadcrumbs;
102101
$this->fireEvent('BeforeBuildBreadcrumbs');
103-
// getIncomingValue('embed_type') == 'mfe'
104102
if(!$showFullBreadcrumbs) {
105103
$temp = [];
106104
if(val('GroupID', $Category) > 0) {
107-
$GroupCategoryID = $this->data('Breadcrumbs.Options.GroupCategoryID');
105+
$GroupCategoryID = $this->data('BreadcrumbsOptionsGroupCategoryID');
108106
foreach ($ancestors as $id => $ancestor) {
109107
if($GroupCategoryID == $ancestor['CategoryID']) {// root category for a group
110108
array_push($temp, ['Name' => $ancestor['Name'], 'Url'=>'/group/'.$ancestor['GroupID']]);
@@ -113,17 +111,14 @@ protected function buildBreadcrumbs($CategoryID) {
113111
}
114112
}
115113
}
116-
if(count($temp) == 1) {
117-
return [];
118-
}
119114
return $temp;
120115
} else {
121116

122117
if (val('GroupID', $Category) > 0) {
123118
$challenge = $this->data('Challenge');
124119
$track = $challenge ? $challenge['Track'] : false;
125120
$temp = [];
126-
$GroupCategoryID = $this->data('Breadcrumbs.Options.GroupCategoryID');
121+
$GroupCategoryID = $this->data('BreadcrumbsOptionsGroupCategoryID');
127122
foreach ($ancestors as $id => $ancestor) {
128123
if ($ancestor['GroupID'] > 0) {
129124
if ($GroupCategoryID == $ancestor['CategoryID']) {// root category for a group

0 commit comments

Comments
 (0)