summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src/init.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-06-18 17:59:09 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-06-18 17:59:09 +0300
commit2f73daf7c5da70dec99de350f71b71cadce82c8b (patch)
tree1f302e133d3a82ef557405b4c0c9a840eddbc3f9 /plugins/Db3x_mmap/src/init.cpp
parentc28759e7c9e63b1d092904b4299afdffec91bcdf (diff)
fixes #1429 (Ability to silently upgrade database) using new Database/SilentUpgrade=1 setting in mirandaboot.ini
Diffstat (limited to 'plugins/Db3x_mmap/src/init.cpp')
-rw-r--r--plugins/Db3x_mmap/src/init.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/Db3x_mmap/src/init.cpp b/plugins/Db3x_mmap/src/init.cpp
index 10e133a2c0..cb7f239a05 100644
--- a/plugins/Db3x_mmap/src/init.cpp
+++ b/plugins/Db3x_mmap/src/init.cpp
@@ -85,8 +85,9 @@ static MDatabaseCommon* LoadDatabase(const wchar_t *profile, BOOL bReadOnly)
return nullptr;
}
- if (IDYES != MessageBoxW(nullptr, TranslateT(CONVERT_MSG), L"Miranda NG", MB_YESNO))
- return nullptr;
+ if (!Profile_GetSettingInt(L"Database/SilentUpgrade"))
+ if (IDYES != MessageBoxW(nullptr, TranslateT(CONVERT_MSG), L"Miranda NG", MB_YESNO))
+ return nullptr;
int errorCode;
CMStringW wszBackupName(profile);