refs #4974 Minor changes

This commit is contained in:
Guillermo Bonet 2023-01-12 20:16:29 +01:00
parent 0184c570a3
commit 8556d44daa
1 changed files with 9 additions and 20 deletions

View File

@ -100,9 +100,9 @@ var App = {
this.certFile = this.appDir + '\\cacert.pem'; this.certFile = this.appDir + '\\cacert.pem';
// Creates the necessary registry entries // Creates the necessary registry entries
var myVersion = this.regRead(Conf.regPath, 'version'); var lastVersion = this.regRead(Conf.regPath, 'lastExecutedVersion');
if (!myVersion || myVersion != Conf.version) { if (!lastVersion || lastVersion != Conf.version) {
var path = 'HKCU\\Software\\Microsoft\\Office\\11.0\\Access\\'; var path = 'HKCU\\Software\\Microsoft\\Office\\11.0\\Access\\';
// Creates the Access configuration entries // Creates the Access configuration entries
@ -120,25 +120,15 @@ var App = {
Conf.odbcDriver Conf.odbcDriver
); );
//Delete old strings values this.createDatasources();
this.regWrite(Conf.regPath, 'remoteURL', Conf.defaultRemoteURL);
this.regWrite(Conf.regPath, 'lastExecutedVersion', Conf.version);
// Delete old strings values (REMOVE IN VERSION 5)
this.regDelete(Conf.regPath + 'configured'); this.regDelete(Conf.regPath + 'configured');
this.regDelete(Conf.regPath + 'remember'); this.regDelete(Conf.regPath + 'remember');
// Datasources creation
this.createDatasources();
// Upload the remote URL
this.regWrite(Conf.regPath, 'remoteURL', Conf.defaultRemoteURL);
// Upload the string value to version installed
this.regWrite(Conf.regPath, 'version', Conf.version);
} }
if (!this.regRead(Conf.regPath, 'currentDatasource'))
this.regWrite(Conf.regPath, 'currentDatasource', Conf.defaultDatasource);
if (!this.regRead(Conf.regPath, 'notSignOut'))
this.regWrite(Conf.regPath, 'notSignOut', 0);
var notSignOut = this.regRead(Conf.regPath, 'notSignOut'); var notSignOut = this.regRead(Conf.regPath, 'notSignOut');
var password = this.regRead(Conf.odbcPath + Conf.dsName, 'PWD'); var password = this.regRead(Conf.odbcPath + Conf.dsName, 'PWD');
@ -712,7 +702,7 @@ var App = {
*/ */
getDatasource: function() { getDatasource: function() {
var datasource = this.regRead( var datasource = this.regRead(
'HKCU\\SOFTWARE\\Verdnatura\\vn-access', Conf.regPath,
'currentDatasource' 'currentDatasource'
); );
return datasource || Conf.defaultDatasource; return datasource || Conf.defaultDatasource;
@ -724,7 +714,7 @@ var App = {
*/ */
getRemoteURL: function() { getRemoteURL: function() {
var remoteURL = this.regRead( var remoteURL = this.regRead(
'HKCU\\SOFTWARE\\Verdnatura\\vn-access', Conf.regPath,
'remoteURL' 'remoteURL'
); );
return remoteURL || Conf.defaultRemoteURL; return remoteURL || Conf.defaultRemoteURL;
@ -765,7 +755,6 @@ var App = {
} }
this.regWrites(myPath, params); this.regWrites(myPath, params);
}; };
}, },
}; };