From: Chuck Scott Date: Mon, 21 Mar 2016 19:48:51 +0000 (-0400) Subject: Fixes to the error page to properly show reason for the error. X-Git-Tag: v2.0.0^2~48 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=d71654baa3905fe1135ac51e47a34a7e62766880;p=WP-Plugins%2Fglm-member-db.git Fixes to the error page to properly show reason for the error. --- diff --git a/models/admin/error/index.php b/models/admin/error/index.php index 20456e32..b9a0cdd3 100644 --- a/models/admin/error/index.php +++ b/models/admin/error/index.php @@ -67,12 +67,21 @@ class GlmMembersAdmin_error_index public function modelAction($actionData = false) { + $reason = false; + + // If an error reason has been supplied + if (isset($actionData['reason']) && $actionData['reason'] != '') { + $reason = $actionData['reason']; + } + // Return status, any suggested view, and any data to controller return array( - 'status' => true, - 'modelRedirect' => false, - 'view' => 'admin/error/index.html', - 'data' => false + 'status' => true, + 'modelRedirect' => false, + 'view' => 'admin/error/index.html', + 'data' => array( + 'reason' => $reason + ) ); } diff --git a/views/admin/error/index.html b/views/admin/error/index.html index 02945e34..9a763ebd 100644 --- a/views/admin/error/index.html +++ b/views/admin/error/index.html @@ -3,7 +3,9 @@

Sorry, we've had some type of fatal error.

- + {if $reason} +

{$reason}

+ {/if}

Please try again. If you still get the same error, contact Gaslight Media at 231-487-0692 for assistance.

diff --git a/views/admin/member/header.html b/views/admin/member/header.html index e69abf42..f556daf1 100644 --- a/views/admin/member/header.html +++ b/views/admin/member/header.html @@ -20,7 +20,7 @@ Member Dashboard {if $memberID} {foreach $addOnTabs as $a} - {$a.text} + {$a.text} {/foreach} {/if}