diff options
author | George Hazan <george.hazan@gmail.com> | 2014-07-27 07:55:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-07-27 07:55:14 +0000 |
commit | f4fbbf8f517f4c53df997ad974533c0bbc174615 (patch) | |
tree | 940c6be0f2a263b4a73d71e498dc6998201eb7ae /plugins | |
parent | 9d9a0ed0b2b6228a9b6e9206e19d3016b9bfb2ec (diff) |
fix for the PU settings upgrade
git-svn-id: http://svn.miranda-ng.org/main/trunk@9960 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/PluginUpdater/src/PluginUpdater.cpp | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp index 4644d6d13e..cbaacb6f7e 100644 --- a/plugins/PluginUpdater/src/PluginUpdater.cpp +++ b/plugins/PluginUpdater/src/PluginUpdater.cpp @@ -140,27 +140,21 @@ extern "C" __declspec(dllexport) int Load(void) SkinAddNewSoundEx("updatefailed",LPGEN("Plugin Updater"),LPGEN("Update failed"));
// Upgrade old settings
- if(!db_set_b(0,MODNAME,"UpdateMode",UPDATE_MODE_STABLE))
- {
- DBVARIANT dbvUpdateURL;
- if (!db_get_s(0,MODNAME, "UpdateURL",&dbvUpdateURL))
- {
- if (!strcmp(dbvUpdateURL.pszVal, DEFAULT_UPDATE_URL))
- {
- db_set_b(0,MODNAME,"UpdateMode",UPDATE_MODE_STABLE);
- db_unset(0,MODNAME, "UpdateURL");
+ if (!db_get_b(0, MODNAME, "UpdateMode", UPDATE_MODE_STABLE)) {
+ ptrA dbvUpdateURL(db_get_sa(0, MODNAME, "UpdateURL"));
+ if (dbvUpdateURL) {
+ if (!strcmp(dbvUpdateURL, DEFAULT_UPDATE_URL)) {
+ db_set_b(0, MODNAME, "UpdateMode", UPDATE_MODE_STABLE);
+ db_unset(0, MODNAME, "UpdateURL");
}
- else if (!strcmp(dbvUpdateURL.pszVal, DEFAULT_UPDATE_URL_TRUNK))
- {
- db_set_b(0,MODNAME,"UpdateMode",UPDATE_MODE_TRUNK);
- db_unset(0,MODNAME, "UpdateURL");
+ else if (!strcmp(dbvUpdateURL, DEFAULT_UPDATE_URL_TRUNK)) {
+ db_set_b(0, MODNAME, "UpdateMode", UPDATE_MODE_TRUNK);
+ db_unset(0, MODNAME, "UpdateURL");
}
- else if (!strcmp(dbvUpdateURL.pszVal, DEFAULT_UPDATE_URL_TRUNK_SYMBOLS"/"))
- {
- db_set_b(0,MODNAME,"UpdateMode",UPDATE_MODE_TRUNK_SYMBOLS);
- db_unset(0,MODNAME, "UpdateURL");
+ else if (!strcmp(dbvUpdateURL, DEFAULT_UPDATE_URL_TRUNK_SYMBOLS"/")) {
+ db_set_b(0, MODNAME, "UpdateMode", UPDATE_MODE_TRUNK_SYMBOLS);
+ db_unset(0, MODNAME, "UpdateURL");
}
- db_free(&dbvUpdateURL);
}
}
return 0;
|