Skip to content
Snippets Groups Projects
Commit 135b69d0 authored by Dorian Merz's avatar Dorian Merz Committed by Robert Lange
Browse files

refs #18066 [master] fix response format of GetAdditionalAccountInfo

* "unpacks" AjaxHandler response
* now shows item counts in MyResearch menu correctly
parent af9e8814
Branches
Tags
No related merge requests found
...@@ -61,16 +61,16 @@ class GetAdditionalAccountInfo extends \VuFind\AjaxHandler\AbstractIlsAndUserAct ...@@ -61,16 +61,16 @@ class GetAdditionalAccountInfo extends \VuFind\AjaxHandler\AbstractIlsAndUserAct
try { try {
$patron = $this->ilsAuthenticator->storedCatalogLogin(); $patron = $this->ilsAuthenticator->storedCatalogLogin();
if ($patron) { if ($patron) {
$additionalAccountInfos = []; $countViewItems = $this->ils->countItems(
$additionalAccountInfos['countViewItems'] = $this->ils->countItems(
$viewsToCount, $viewsToCount,
$patron $patron
); );
$additionalAccountInfos['countFines'] = $this->ils->getFinesTotal( $countFines = $this->ils->getFinesTotal(
$patron $patron
); );
return $this->formatResponse(compact('additionalAccountInfos'));
return $this->formatResponse(compact('countViewItems','countFines'));
} }
} catch (\Exception $e) { } catch (\Exception $e) {
// Do nothing -- just fail through to the error message below. // Do nothing -- just fail through to the error message below.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment