summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-07-31 20:07:18 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-07-31 20:07:18 +0300
commit559dbc7b53b097c0beb326bf82302aaed6cfa0a8 (patch)
treea7562045ef397aec23d9aec4de150ff3a92ead17 /plugins/UserInfoEx
parentf6b30701f54f28912b19994606888e109f9ac3f4 (diff)
fixes #3130 (WhenWasIt ведёт себя странно)
Diffstat (limited to 'plugins/UserInfoEx')
-rw-r--r--plugins/UserInfoEx/src/classMAnnivDate.cpp19
-rw-r--r--plugins/UserInfoEx/src/svc_constants.h3
2 files changed, 3 insertions, 19 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;
}
diff --git a/plugins/UserInfoEx/src/svc_constants.h b/plugins/UserInfoEx/src/svc_constants.h
index 6597db78f6..b1e8bb5443 100644
--- a/plugins/UserInfoEx/src/svc_constants.h
+++ b/plugins/UserInfoEx/src/svc_constants.h
@@ -106,9 +106,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define SET_CONTACT_BIRTHDAY "BirthDay"
#define SET_CONTACT_BIRTHMONTH "BirthMonth"
#define SET_CONTACT_BIRTHYEAR "BirthYear"
-#define SET_CONTACT_DOBD "DOBd"
-#define SET_CONTACT_DOBM "DOBm"
-#define SET_CONTACT_DOBY "DOBy"
// database settings (company psp)
#define SET_CONTACT_COMPANY_POSITION "CompanyPosition"