From a11039818c4923b1990c4ffe6c26dee512f78f6a Mon Sep 17 00:00:00 2001 From: Dorian Merz <merz@ub.uni-leipzig.de> Date: Wed, 27 Feb 2019 14:52:30 +0100 Subject: [PATCH] refs #14803 * fixes bug in pickTitle() --- .../finc/Hierarchy/TreeDataFormatter/NoCollections.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/module/finc/src/finc/Hierarchy/TreeDataFormatter/NoCollections.php b/module/finc/src/finc/Hierarchy/TreeDataFormatter/NoCollections.php index ba75a1748a9..d9d4122f923 100644 --- a/module/finc/src/finc/Hierarchy/TreeDataFormatter/NoCollections.php +++ b/module/finc/src/finc/Hierarchy/TreeDataFormatter/NoCollections.php @@ -43,4 +43,14 @@ class NoCollections extends \VuFind\Hierarchy\TreeDataFormatter\Json //always return false to ensure Record-Links only return false; } + + protected function pickTitle($record, $parentID) + { + if (is_null($parentID)) { + return isset($record->title) ? $record->title : $record->id; + } + else { + return parent::pickTitle($record, $parentID); + } + } } -- GitLab