diff options
Diffstat (limited to 'plugins/PluginUpdater/src/PluginUpdater.cpp')
-rw-r--r-- | plugins/PluginUpdater/src/PluginUpdater.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp index 5e14fddd70..4644d6d13e 100644 --- a/plugins/PluginUpdater/src/PluginUpdater.cpp +++ b/plugins/PluginUpdater/src/PluginUpdater.cpp @@ -138,6 +138,31 @@ extern "C" __declspec(dllexport) int Load(void) //add sounds
SkinAddNewSoundEx("updatecompleted",LPGEN("Plugin Updater"),LPGEN("Update completed"));
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");
+ }
+ 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.pszVal, 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;
}
|