From: Chuck Scott Date: Tue, 7 Jun 2016 18:44:21 +0000 (-0400) Subject: Fixing references to $this->wpdb which should now be $wpdb for database updates X-Git-Tag: v2.1^2~12 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=055ed1bf1fbfdbd9e6f3e57664fc66f8678b3e7e;p=WP-Plugins%2Fglm-member-db.git Fixing references to $this->wpdb which should now be $wpdb for database updates --- diff --git a/setup/databaseScripts/update_database_V1.0.28.php b/setup/databaseScripts/update_database_V1.0.28.php index 78627274..2b19ec70 100644 --- a/setup/databaseScripts/update_database_V1.0.28.php +++ b/setup/databaseScripts/update_database_V1.0.28.php @@ -10,7 +10,7 @@ $infoRecords = $this->wpdb->get_results('SELECT id, member_name FROM '.GLM_MEMBE if ($infoRecords && count($infoRecords) > 0) { foreach ($infoRecords as $i) { $slug = sanitize_title($i['member_name']); - $this->wpdb->update( + $wpdb->update( GLM_MEMBERS_PLUGIN_DB_PREFIX.'member_info', array( 'member_slug' => $slug diff --git a/setup/databaseScripts/update_database_V1.0.30.php b/setup/databaseScripts/update_database_V1.0.30.php index 3bcccc09..2fdc1fb7 100644 --- a/setup/databaseScripts/update_database_V1.0.30.php +++ b/setup/databaseScripts/update_database_V1.0.30.php @@ -10,7 +10,7 @@ $memberRecords = $this->wpdb->get_results('SELECT id, name FROM '.GLM_MEMBERS_PL if ($memberRecords && count($memberRecords) > 0) { foreach ($memberRecords as $m) { $slug = sanitize_title($m['name']); - $this->wpdb->update( + $wpdb->update( GLM_MEMBERS_PLUGIN_DB_PREFIX.'members', array( 'member_slug' => $slug diff --git a/setup/databaseScripts/update_database_V1.1.3.php b/setup/databaseScripts/update_database_V1.1.3.php index a6fb85ce..37bfcee0 100644 --- a/setup/databaseScripts/update_database_V1.1.3.php +++ b/setup/databaseScripts/update_database_V1.1.3.php @@ -12,6 +12,6 @@ update_option('glmMembersContactsDbVersion', '0.0.1'); $prefix = substr(GLM_MEMBERS_PLUGIN_DB_PREFIX, 0, -1)."Contacts_"; // Rename contacts table to move it to Contacts add-on -$this->wpdb->query(" +$wpdb->query(" RENAME TABLE ".GLM_MEMBERS_PLUGIN_DB_PREFIX."contacts TO ".$prefix."contacts; ");