Adding for error logs in admin controller.
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 17 Oct 2017 19:56:03 +0000 (15:56 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 17 Oct 2017 19:56:03 +0000 (15:56 -0400)
Add the name of the model in trigger error.
Add the name of the view in trigger error.
Only shows if admin errors turned on.

controllers/admin.php

index 4e82b9f..47dd3fe 100644 (file)
@@ -791,6 +791,9 @@ class glmMembersAdmin extends GlmPluginSupport
             $modelName = GLM_MEMBERS_WORDPRESS_PLUGIN_PATH . "$plugIn/models/admin/$menuItem/$action.php";
             $className = 'GlmMembersAdmin_' . $menuItem . '_' . $action;
             $loopTracking .= "<p>Loop: $loopCheck<br>Model: $modelName<br>Class: $className</p>";
+            if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
+                trigger_error("Notice: Model: ".$modelName, E_USER_NOTICE);
+            }
 
             // Create hook to add page tabs by add-on plugins
             $addOnTabs = array();
@@ -866,6 +869,9 @@ class glmMembersAdmin extends GlmPluginSupport
                     // If a view file is specified
                     $badView = false;
                     if ($view) {
+                        if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
+                            trigger_error("Notice: View: ".$view, E_USER_NOTICE);
+                        }
 
                         // Get the specified view file - check theme first
                         $viewPath = "$theme/$plugIn/views";