Fixes to the error page to properly show reason for the error.
authorChuck Scott <cscott@gaslightmedia.com>
Mon, 21 Mar 2016 19:48:51 +0000 (15:48 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Mon, 21 Mar 2016 19:48:51 +0000 (15:48 -0400)
models/admin/error/index.php
views/admin/error/index.html
views/admin/member/header.html

index 20456e3..b9a0cdd 100644 (file)
@@ -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
+            )
         );
 
     }
index 02945e3..9a763eb 100644 (file)
@@ -3,7 +3,9 @@
     <center>
     
         <h3>Sorry, we've had some type of fatal error.</h3>
-        
+    {if $reason}
+        <p class="glm-error">{$reason}</p>
+    {/if}
         <p>Please try again. If you still get the same error, contact Gaslight Media at 231-487-0692 for assistance.</p>
           
     </center>
index e69abf4..f556daf 100644 (file)
@@ -20,7 +20,7 @@
         <a href="{$thisUrl}?page={$thisPage}&glm_action=index&member={$memberID}&id={$memberInfoID}" class="nav-tab{if $thisAction==index || $thisAction==memberEdit || $thisAction==memberInfo} nav-tab-active{/if}">Member Dashboard</a>
 {if $memberID}
   {foreach $addOnTabs as $a}
-        <a href="{$thisUrl}?page={$thisPage}&glm_action={$a.action}&member={$memberID}" class="nav-tab{if $thisAction==$a.action} nav-tab-active{/if}">{$a.text}</a>
+        <a href="{$thisUrl}?page={$thisPage}&glm_action={$a.action}{if isset($a.option)}&option={$a.option}{/if}&member={$memberID}" class="nav-tab{if $thisAction==$a.action} nav-tab-active{/if}">{$a.text}</a>
   {/foreach}        
 {/if}