diff options
author | George Hazan <ghazan@miranda.im> | 2022-07-31 20:07:18 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-07-31 20:07:18 +0300 |
commit | 559dbc7b53b097c0beb326bf82302aaed6cfa0a8 (patch) | |
tree | a7562045ef397aec23d9aec4de150ff3a92ead17 /plugins/UserInfoEx/src/classMAnnivDate.cpp | |
parent | f6b30701f54f28912b19994606888e109f9ac3f4 (diff) |
fixes #3130 (WhenWasIt ведёт себя странно)
Diffstat (limited to 'plugins/UserInfoEx/src/classMAnnivDate.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/classMAnnivDate.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.cpp b/plugins/UserInfoEx/src/classMAnnivDate.cpp index 940ddcda6c..c237fbb343 100644 --- a/plugins/UserInfoEx/src/classMAnnivDate.cpp +++ b/plugins/UserInfoEx/src/classMAnnivDate.cpp @@ -468,9 +468,7 @@ int MAnnivDate::DBGetBirthDate(MCONTACT hContact, LPSTR pszProto) Clear();
// try to get birthday from any custom module
- if ( !DBGetDate(hContact, USERINFO, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR) ||
- !DBGetDate(hContact, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR) ||
- !DBGetDate(hContact, USERINFO, SET_CONTACT_DOBD, SET_CONTACT_DOBM, SET_CONTACT_DOBY))
+ if (!DBGetDate(hContact, USERINFO, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR))
{
SetFlags(MADF_HASCUSTOM);
}
@@ -528,20 +526,9 @@ int MAnnivDate::DBGetBirthDate(MCONTACT hContact, LPSTR pszProto) int MAnnivDate::DBWriteBirthDate(MCONTACT hContact)
{
int rc = DBWriteDate(hContact, USERINFO, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR);
- if (!rc) {
- if (
- // only delete values from current contact's custom modules
- !(_wFlags & (MADF_HASPROTO|MADF_HASMETA)) &&
- // check whether user wants this feature
- g_plugin.getByte(SET_REMIND_SECUREBIRTHDAY, TRUE))
- {
- // keep the database clean
- DBDeleteDate(hContact, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR);
- DBDeleteDate(hContact, USERINFO, SET_CONTACT_DOBD, SET_CONTACT_DOBM, SET_CONTACT_DOBY);
- }
-
+ if (!rc)
rc = db_set_w(hContact, USERINFO, SET_CONTACT_AGE, Age());
- }
+
return rc;
}
|