refs #4974 Commented code to delete in future ver.
This commit is contained in:
parent
42c1426ff7
commit
1994674de5
26
src/main.js
26
src/main.js
|
@ -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 = {
|
var Conf = {
|
||||||
appName: 'Verdnatura',
|
appName: 'Verdnatura',
|
||||||
odbcPath: 'HKCU\\SOFTWARE\\ODBC\\ODBC.INI\\',
|
odbcPath: 'HKCU\\SOFTWARE\\ODBC\\ODBC.INI\\',
|
||||||
|
@ -94,12 +98,22 @@ var App = {
|
||||||
this.regWrite(path + 'Security', 'Level', 1);
|
this.regWrite(path + 'Security', 'Level', 1);
|
||||||
|
|
||||||
// Creates the MySQL ODBC connection
|
// 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, 'remoteURL', Conf.defaultRemoteURL);
|
||||||
this.regWrite(Conf.regPath, 'lastExecutedVersion', Conf.version);
|
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 +'\\configured');
|
||||||
this.regDelete(Conf.regPath + '\\remember');
|
this.regDelete(Conf.regPath + '\\remember');
|
||||||
this.regDelete(Conf.odbcPath +'verdnatura\\');
|
this.regDelete(Conf.odbcPath +'verdnatura\\');
|
||||||
|
@ -144,12 +158,12 @@ var App = {
|
||||||
selectDatarouce.options.add(option[y])
|
selectDatarouce.options.add(option[y])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// In case old general odbc (REMOVE IN VERSION 6)
|
// REMOVE!
|
||||||
if (this.dsName == 'verdnatura') {
|
if (this.dsName == 'verdnatura') {
|
||||||
this.dsName = Conf.defaultDatasource;
|
this.dsName = Conf.defaultDatasource;
|
||||||
this.$('datasource').value = this.dsName + Conf.identifier;
|
this.$('datasource').value = this.dsName + Conf.identifier;
|
||||||
this.$('datasource').text = this.dsName;
|
this.$('datasource').text = this.dsName;
|
||||||
} else
|
} else // -----
|
||||||
this.$('datasource').value = this.dsName;
|
this.$('datasource').value = this.dsName;
|
||||||
|
|
||||||
if (notSignOut && password) {
|
if (notSignOut && password) {
|
||||||
|
@ -174,11 +188,11 @@ var App = {
|
||||||
this.$('user').focus();
|
this.$('user').focus();
|
||||||
this.$('user').select();
|
this.$('user').select();
|
||||||
},
|
},
|
||||||
createODBC: function(path, dsName, driverName) {
|
createODBC: function(path, dsName, driverName, description) {
|
||||||
var driverPath = this.getEnv('ProgramFiles') + Conf.driverPath;
|
var driverPath = this.getEnv('ProgramFiles') + Conf.driverPath;
|
||||||
var params = {
|
var params = {
|
||||||
Driver: driverPath,
|
Driver: driverPath,
|
||||||
DESCRIPTION: Conf.defaultDatasource,
|
DESCRIPTION: description,
|
||||||
SERVER: Conf.defaultServer,
|
SERVER: Conf.defaultServer,
|
||||||
DATABASE: Conf.dbName,
|
DATABASE: Conf.dbName,
|
||||||
SSLCA: this.certFile,
|
SSLCA: this.certFile,
|
||||||
|
|
Loading…
Reference in New Issue