From d7798df0113249540440b8a28c78ecdf24307dba Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Wed, 25 Apr 2018 10:07:25 -0400
Subject: [PATCH] Fix bug: missing main author on collections.

---
 .../View/Helper/Root/RecordDataFormatterFactory.php       | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatterFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatterFactory.php
index f2da01a8434..75e6dba5e6d 100644
--- a/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatterFactory.php
+++ b/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatterFactory.php
@@ -72,10 +72,10 @@ class RecordDataFormatterFactory
             [
                 'useCache' => true,
                 'labelFunction' => function ($data) {
-                    return count($data['main']) > 1
+                    return count($data['primary']) > 1
                         ? 'Main Authors' : 'Main Author';
                 },
-                'context' => ['type' => 'main', 'schemaLabel' => 'author'],
+                'context' => ['type' => 'primary', 'schemaLabel' => 'author'],
             ]
         );
         $spec->setTemplateLine(
@@ -140,10 +140,10 @@ class RecordDataFormatterFactory
             [
                 'useCache' => true,
                 'labelFunction' => function ($data) {
-                    return count($data['main']) > 1
+                    return count($data['primary']) > 1
                         ? 'Main Authors' : 'Main Author';
                 },
-                'context' => ['type' => 'main', 'schemaLabel' => 'author'],
+                'context' => ['type' => 'primary', 'schemaLabel' => 'author'],
             ]
         );
         $spec->setTemplateLine(
-- 
GitLab