From 480aab2b3ffb0b439e160a8c716ef0d982af1acf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 23 Jul 2014 15:43:18 +0000 Subject: removing direct access to metas: AVS git-svn-id: http://svn.miranda-ng.org/main/trunk@9924 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AVS/src/utils.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'plugins/AVS/src/utils.cpp') diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp index e4ab45e2ff..f1a1809be5 100644 --- a/plugins/AVS/src/utils.cpp +++ b/plugins/AVS/src/utils.cpp @@ -508,14 +508,12 @@ protoPicCacheEntry *GetProtoDefaultAvatar(MCONTACT hContact) MCONTACT GetContactThatHaveTheAvatar(MCONTACT hContact, int locked) { - if (db_get_b(NULL, META_PROTO, "Enabled", 0)) { - if (db_get_dw(hContact, META_PROTO, "NumContacts", 0) >= 1) { - if (locked == -1) - locked = db_get_b(hContact, "ContactPhoto", "Locked", 0); + if (db_mc_isMeta(hContact)) { + if (locked == -1) + locked = db_get_b(hContact, "ContactPhoto", "Locked", 0); - if (!locked) - hContact = db_mc_getMostOnline(hContact); - } + if (!locked) + hContact = db_mc_getMostOnline(hContact); } return hContact; } -- cgit v1.2.3