From 012aec34791ef1fd294e40906707bc83864d6606 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Tue, 17 Oct 2017 15:56:03 -0400 Subject: [PATCH] Adding for error logs in admin controller. 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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/controllers/admin.php b/controllers/admin.php index 4e82b9f6..47dd3fec 100644 --- a/controllers/admin.php +++ b/controllers/admin.php @@ -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 .= "

Loop: $loopCheck
Model: $modelName
Class: $className

"; + 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"; -- 2.17.1