From: Chuck Scott Date: Tue, 31 Oct 2017 18:18:36 +0000 (-0400) Subject: Commended out call to clear debug notices in plugin support class. X-Git-Tag: v2.10.15^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fhotfix%2F2.10.15;p=WP-Plugins%2Fglm-member-db.git Commended out call to clear debug notices in plugin support class. Fixed adding a member so it now sends user to that members dashboard after adding it. Updated plugin version number to 2.10.15 and documented updates in readme.txt file. --- diff --git a/classes/glmPluginSupport.php b/classes/glmPluginSupport.php index dc93715f..e09d3d46 100644 --- a/classes/glmPluginSupport.php +++ b/classes/glmPluginSupport.php @@ -44,9 +44,9 @@ class GlmPluginSupport // Depreciating debug system - Make sure all notices are cleared // Will delete this method after all references are purged. - - $this->clearNotices(); - + +// $this->clearNotices(); + return; } diff --git a/index.php b/index.php index 651ab869..7d754975 100644 --- a/index.php +++ b/index.php @@ -19,7 +19,7 @@ * @package glmMembersDatabase * @author Chuck Scott * @license http://www.gaslightmedia.com Gaslightmedia - * @version 2.10.14 + * @version 2.10.15 */ // Check that we're being called by WordPress. @@ -44,7 +44,7 @@ if (!defined('ABSPATH')) { * */ -define('GLM_MEMBERS_PLUGIN_VERSION', '2.10.14'); +define('GLM_MEMBERS_PLUGIN_VERSION', '2.10.15'); define('GLM_MEMBERS_PLUGIN_DB_VERSION', '1.1.32'); // Check if plugin version is not current in WordPress option and if needed updated it diff --git a/models/admin/member/memberEdit.php b/models/admin/member/memberEdit.php index d9b043a0..13384024 100644 --- a/models/admin/member/memberEdit.php +++ b/models/admin/member/memberEdit.php @@ -236,7 +236,7 @@ class GlmMembersAdmin_member_memberEdit extends GlmDataMembers break; - // Add the new member + // Add the new member case 'addNew': $memberData = $this->insertEntry(); @@ -246,21 +246,17 @@ class GlmMembersAdmin_member_memberEdit extends GlmDataMembers $this->memberID = $memberData['fieldData']['id']; - $slug = $this->updateSlug($this->memberID); - - $memberData = $this->editEntry($this->memberID); - $memberUpdated = true; - $haveMember = true; - - // Also update all member info records with any possible name change - $sql = " - UPDATE ".GLM_MEMBERS_PLUGIN_DB_PREFIX."member_info - SET member_name = '".addslashes($memberData['fieldData']['name'])."' - WHERE member = $this->memberID - ;"; - $this->wpdb->query($sql); - - $memberName = $memberData['fieldData']['name']; + // Set this member as the current one + update_option('glmMembersDatabaseMemberID', $this->memberID); + + // Redirect to the Member Dashboard where it will pick up on this member + return array( + 'status' => $success, + 'menuItemRedirect' => 'member', + 'modelRedirect' => 'index', + 'view' => 'admin/member/memberEdit.html', + 'data' => array() + ); } else { $memberUpdateError = true; diff --git a/readme.txt b/readme.txt index e1d667a5..9ecf91a9 100644 --- a/readme.txt +++ b/readme.txt @@ -66,6 +66,14 @@ There is of course much more to this. (none) == Changelog == + += 2.10.15 = +* When a new member is added the user is now redirected to the member dashboard + for the new member rather than requiring the user to search for that member. +* Commented out call to clear debug notices in plugin support class. This will + be followed up by changes headed toward fully removing the old pop-up notice + window and replacing that with error log messages. + = 2.10.13 = Hotfix for member 404 pages.