From: Chuck Scott Date: Thu, 18 Jan 2018 16:40:01 +0000 (-0500) Subject: 2 Fixes: Database update for file_library, failure during deactivate X-Git-Tag: v2.10.23^2~22^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=1b49f12c185a1b70116b858ba3f8590ed5ae7aaa;p=WP-Plugins%2Fglm-member-db.git 2 Fixes: Database update for file_library, failure during deactivate Updated database update 1.1.33 to use NULL for DATETIME field for file_library table. Commented out code in deactivate.php to remove current_user_can() call that can't be run there. --- diff --git a/deactivate.php b/deactivate.php index 352e8f06..2ced0ebd 100644 --- a/deactivate.php +++ b/deactivate.php @@ -54,9 +54,11 @@ class glmMembersPluginDeactivate extends glmPluginSupport { // Make sure the current user has this capability +/* if (!current_user_can('activate_plugins')) { die(); } +*/ // Check if there was an error and WP is calling us again if ($this->checkErrorScrape()) { diff --git a/setup/databaseScripts/create_database_V1.1.33.sql b/setup/databaseScripts/create_database_V1.1.33.sql index 1fd8d26d..5844b472 100644 --- a/setup/databaseScripts/create_database_V1.1.33.sql +++ b/setup/databaseScripts/create_database_V1.1.33.sql @@ -292,7 +292,7 @@ CREATE TABLE {prefix}file_library ( file_name TINYTEXT NULL, -- Stored file name for the file descr TEXT NULL, -- Description title TINYTEXT NULL, -- File title - last_access_time DATETIME DEFAULT NOW(), -- Upload time or last access time + last_access_time DATETIME NULL, -- Upload time or last access time PRIMARY KEY (id), INDEX(name(20)), INDEX(file_name(20)) diff --git a/setup/databaseScripts/update_database_V1.1.33.sql b/setup/databaseScripts/update_database_V1.1.33.sql index d17d8fef..7ae901f4 100644 --- a/setup/databaseScripts/update_database_V1.1.33.sql +++ b/setup/databaseScripts/update_database_V1.1.33.sql @@ -25,7 +25,7 @@ CREATE TABLE {prefix}file_library ( file_name TINYTEXT NULL, -- Stored file name for the file descr TEXT NULL, -- Description title TINYTEXT NULL, -- File title - last_access_time DATETIME DEFAULT NOW(), -- Upload time or last access time + last_access_time DATETIME NULL, -- Upload time or last access time PRIMARY KEY (id), INDEX(name(20)), INDEX(file_name(20))