diff options
author | George Hazan <ghazan@miranda.im> | 2018-11-12 21:44:56 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-11-12 21:44:56 +0300 |
commit | 53fe3e46177d17b4941610de19f5cc6210700cb4 (patch) | |
tree | b67a6bc208dad141f9db14035cd7e42ff2a51872 /plugins/NewsAggregator/Src/Update.cpp | |
parent | 488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff) |
db_* functions replaced with g_plugin calls
Diffstat (limited to 'plugins/NewsAggregator/Src/Update.cpp')
-rw-r--r-- | plugins/NewsAggregator/Src/Update.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/NewsAggregator/Src/Update.cpp b/plugins/NewsAggregator/Src/Update.cpp index 7809904ad9..cde3ef2686 100644 --- a/plugins/NewsAggregator/Src/Update.cpp +++ b/plugins/NewsAggregator/Src/Update.cpp @@ -33,7 +33,7 @@ void CALLBACK timerProc(HWND, UINT, UINT_PTR, DWORD) for (auto &hContact : Contacts(MODULENAME)) {
if (db_get_dw(hContact, MODULENAME, "UpdateTime", DEFAULT_UPDATE_TIME)) {
double diff = difftime(time(0), (time_t)db_get_dw(hContact, MODULENAME, "LastCheck", 0));
- if (db_get_b(NULL, MODULENAME, "AutoUpdate", 1) != 0 && diff >= db_get_dw(hContact, MODULENAME, "UpdateTime", DEFAULT_UPDATE_TIME) * 60) {
+ if (g_plugin.getByte("AutoUpdate", 1) != 0 && diff >= db_get_dw(hContact, MODULENAME, "UpdateTime", DEFAULT_UPDATE_TIME) * 60) {
UpdateListAdd(hContact);
HaveUpdates = TRUE;
}
@@ -51,8 +51,8 @@ void CALLBACK timerProc2(HWND, UINT, UINT_PTR, DWORD) KillTimer(nullptr, timerId);
ThreadRunning = FALSE;
- if (db_get_b(NULL, MODULENAME, "AutoUpdate", 1) && !Miranda_IsTerminated()) {
- if (db_get_b(NULL, MODULENAME, "StartupRetrieve", 1))
+ if (g_plugin.getByte("AutoUpdate", 1) && !Miranda_IsTerminated()) {
+ if (g_plugin.getByte("StartupRetrieve", 1))
CheckAllFeeds(0, 1);
timerId = SetTimer(nullptr, 0, 30000, (TIMERPROC)timerProc);
}
|