Skip to content

Commit

Permalink
fix results for accessible sys rec category
Browse files Browse the repository at this point in the history
  • Loading branch information
catsoup11789 committed May 20, 2024
1 parent 6c14f71 commit 8eb99a1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion code/web/services/Browse/AJAX.php
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ private function getSuggestionsBrowseCategoryResults($pageToLoad = 1) {
$browseMode = $this->setBrowseMode();

global $interface;
$accessibleBrowseCategories = $interface->getVariable('accessibleBrowseCategories');
$interface->assign('browseCategoryId', $this->textId);
$result['success'] = true;
$result['textId'] = $this->textId;
Expand Down Expand Up @@ -497,7 +498,12 @@ private function getSuggestionsBrowseCategoryResults($pageToLoad = 1) {
$records[] = $interface->fetch('Browse/noResults.tpl');
}

$result['records'] = implode('', $records);
if($accessibleBrowseCategories == '1' || $accessibleBrowseCategories == 1) {
$result['records'] = $records;
} else {
$result['records'] = implode('', $records);
}

$result['numRecords'] = count($records);

return $result;
Expand Down

0 comments on commit 8eb99a1

Please sign in to comment.