* @access private
*/
public $dbVersions = array(
- '0.1' => array('version' => '0.1', 'tables' => 24)
+ '0.1' => array('version' => '0.1', 'tables' => 26)
);
/**
// Check if the database version set for this plugin is invalid.
if (!isset($this->dbVersions[$dbVersion])) {
- $this->addNotice("The last database version set for the ".GLM_MEMBERS_PLUGIN_NAME." (V$dbVersion) isn't valid.");
+ update_option('glmMembersInstallErrors', "The last database version set for the ".GLM_MEMBERS_PLUGIN_NAME." (V$dbVersion) isn't valid.");
return false;
}
// Otherwise check if the number of tables is correct
} elseif ($tables != $existingTables) {
- $this->addNotice('We do not have the correct number of tables for the currently set database version (V'.$dbVersion.') for the '.GLM_MEMBERS_PLUGIN_NAME.'.');
- $this->addNotice("There should be $tables but there are currently $existingTables. Please call for support.");
+ update_option('glmMembersInstallErrors', 'We do not have the correct number of tables for the currently set database version (V'.$dbVersion.') for the '.GLM_MEMBERS_PLUGIN_NAME.'.'
+ ."<br>There should be $tables but there are currently $existingTables. Please call for support."
+ );
return false;
}
if (trim($queryError) == '') {
// Notify the user that the database has been installed
- $this->addNotice('New database tables installed for the '.GLM_MEMBERS_PLUGIN_NAME.' plugin.');
+ update_option('glmMembersInstallErrors', 'New database tables installed for the '.GLM_MEMBERS_PLUGIN_NAME.' plugin.');
// Save the version of the installed database
update_option('glmMembersDatabaseDbVersion', $dbVersion);
$db_setup_status = true;
} else {
- $this->addNotice('Failure installing database tables for the '.GLM_MEMBERS_PLUGIN_NAME.' plugin.');
- $this->addNotice('<b>Database Installation Error:</b> '.print_r($queryError,1), 'Alert');
- $this->addNotice($q, 'DataBlock', 'Database Installation Query');
+ update_option('glmMembersInstallErrors', 'Failure installing database tables for the '.GLM_MEMBERS_PLUGIN_NAME
+ .'<br><b>Database Installation Error:</b> '.print_r($queryError,1)
+ .'<br><pre>'.$q.'</pre>'
+ );
}
// Otherwise, check if we need to update the database