From af040b3d30122a4d6d4ae71e409b93f195130fdd Mon Sep 17 00:00:00 2001 From: Laetitia Fesselier Date: Tue, 22 Dec 2020 13:30:46 -0500 Subject: [PATCH] [Core] Error page - Main page link fix --- src/Http/Error.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Http/Error.php b/src/Http/Error.php index f0ac57ab72e..c149dc6d4ff 100644 --- a/src/Http/Error.php +++ b/src/Http/Error.php @@ -47,11 +47,13 @@ public function __construct( $uri = $request->getURI(); $baseurl = $uri->getScheme() .'://'. $uri->getAuthority(); - $tpl_data = []; + $tpl_data = [ + 'message' => $message, + 'baseurl' => $baseurl, + ]; $lorisInstance = $request->getAttribute('loris'); $user = $request->getAttribute('user') ?? new \LORIS\AnonymousUser(); - // Add a link to the issue tracker as long as a LORIS Instance object // is present in the request. @@ -59,14 +61,10 @@ public function __construct( && $lorisInstance !== null ) { // Add admistrator email. - $contact = $lorisInstance + $tpl_data['contact'] = $lorisInstance ->getConfiguration() ->getSetting('mail')['From']; - $tpl_data = array( - 'message' => $message, - 'baseurl' => $baseurl, - 'contact' => $contact, - ); + // Add issue tracker data if the error is encountered by a user with // the correct permissions. $canReport = $user->hasAnyPermission(