From f90c2d591aec8d0f7c4c41b420a3e1b54fc082de Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Sun, 8 Sep 2013 19:22:33 +0000 Subject: - WhenWasIt: reordering birthday validation check - (patch from person) git-svn-id: http://svn.miranda-ng.org/main/trunk@6025 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/WhenWasIt/src/date_utils.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/WhenWasIt/src/date_utils.cpp b/plugins/WhenWasIt/src/date_utils.cpp index a903a36a28..6c510da4ae 100644 --- a/plugins/WhenWasIt/src/date_utils.cpp +++ b/plugins/WhenWasIt/src/date_utils.cpp @@ -41,12 +41,6 @@ int GetContactDOB(HANDLE hContact, int &year, int &month, int &day) if ( IsDOBValid(year, month, day)) return DOB_USERINFO; - year = db_get_w(hContact, "mBirthday", "BirthYear", 0); - month = db_get_b(hContact, "mBirthday", "BirthMonth", 0); - day = db_get_b(hContact, "mBirthday", "BirthDay", 0); - if ( IsDOBValid(year, month, day)) - return DOB_MBIRTHDAY; - char *szProto = GetContactProto(hContact); year = db_get_w(hContact, szProto, "BirthYear", 0); month = db_get_b(hContact, szProto, "BirthMonth", 0); @@ -60,6 +54,12 @@ int GetContactDOB(HANDLE hContact, int &year, int &month, int &day) if ( IsDOBValid(year, month, day)) return DOB_BIRTHDAYREMINDER; + year = db_get_w(hContact, "mBirthday", "BirthYear", 0); + month = db_get_b(hContact, "mBirthday", "BirthMonth", 0); + day = db_get_b(hContact, "mBirthday", "BirthDay", 0); + if ( IsDOBValid(year, month, day)) + return DOB_MBIRTHDAY; + year = db_get_dw(hContact, "micqBirthday", "BirthYear", 0); month = db_get_dw(hContact, "micqBirthday", "BirthMonth", 0); day = db_get_dw(hContact, "micqBirthday", "BirthDay", 0); -- cgit v1.2.3