refs #4974 Commented code to delete in future ver.

This commit is contained in:
Guillermo Bonet 2023-02-02 10:21:55 +01:00
parent 42c1426ff7
commit 1994674de5
1 changed files with 20 additions and 6 deletions

View File

@ -1,3 +1,7 @@
// Check when version 6 is uploaded
// Only in case all host have version 5
// Delete code with comment REMOVE!
var Conf = {
appName: 'Verdnatura',
odbcPath: 'HKCU\\SOFTWARE\\ODBC\\ODBC.INI\\',
@ -94,12 +98,22 @@ var App = {
this.regWrite(path + 'Security', 'Level', 1);
// Creates the MySQL ODBC connection
this.createODBC(Conf.odbcPath, defaultDsName, Conf.odbcDriver);
this.createODBC(Conf.odbcPath,
defaultDsName,
Conf.odbcDriver,
Conf.defaultDatasource
);
this.regWrite(Conf.regPath, 'remoteURL', Conf.defaultRemoteURL);
this.regWrite(Conf.regPath, 'lastExecutedVersion', Conf.version);
// Delete old strings values (REMOVE IN VERSION 6)
// REMOVE!
this.createODBC(Conf.odbcPath,
'verdnatura',
Conf.odbcDriver,
'keep for backward compatibility'
);
// -----
this.regDelete(Conf.regPath +'\\configured');
this.regDelete(Conf.regPath + '\\remember');
this.regDelete(Conf.odbcPath +'verdnatura\\');
@ -144,12 +158,12 @@ var App = {
selectDatarouce.options.add(option[y])
}
}
// In case old general odbc (REMOVE IN VERSION 6)
// REMOVE!
if (this.dsName == 'verdnatura') {
this.dsName = Conf.defaultDatasource;
this.$('datasource').value = this.dsName + Conf.identifier;
this.$('datasource').text = this.dsName;
} else
} else // -----
this.$('datasource').value = this.dsName;
if (notSignOut && password) {
@ -174,11 +188,11 @@ var App = {
this.$('user').focus();
this.$('user').select();
},
createODBC: function(path, dsName, driverName) {
createODBC: function(path, dsName, driverName, description) {
var driverPath = this.getEnv('ProgramFiles') + Conf.driverPath;
var params = {
Driver: driverPath,
DESCRIPTION: Conf.defaultDatasource,
DESCRIPTION: description,
SERVER: Conf.defaultServer,
DATABASE: Conf.dbName,
SSLCA: this.certFile,