Commended out call to clear debug notices in plugin support class. hotfix/2.10.15
authorChuck Scott <cscott@gaslightmedia.com>
Tue, 31 Oct 2017 18:18:36 +0000 (14:18 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Tue, 31 Oct 2017 18:18:36 +0000 (14:18 -0400)
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.

classes/glmPluginSupport.php
index.php
models/admin/member/memberEdit.php
readme.txt

index dc93715..e09d3d4 100644 (file)
@@ -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;
 
     }
index 651ab86..7d75497 100644 (file)
--- a/index.php
+++ b/index.php
@@ -19,7 +19,7 @@
  * @package glmMembersDatabase
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @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
index d9b043a..1338402 100644 (file)
@@ -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;
index e1d667a..9ecf91a 100644 (file)
@@ -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.