summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-20 09:45:33 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-20 09:45:33 +0000
commitfedcd0462671c913f1b36e2111b3a5c8161f2b3e (patch)
tree7bf491af251cbba46c68b47518cd52c8df734702 /plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
parent01d02592c3b4b6dee10c62d64c9f5e5c4953a01c (diff)
fix for the endless recursion in uinfoex
git-svn-id: http://svn.miranda-ng.org/main/trunk@2387 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp')
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp34
1 files changed, 13 insertions, 21 deletions
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
index 0f29f08c25..faa5478d61 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
@@ -198,26 +198,17 @@ TiXmlElement* CExImContactXML::CreateXmlElement()
**/
INT CExImContactXML::ExportContact(DB::CEnumList* pModules)
{
- if (_pXmlFile->_wExport & EXPORT_DATA)
- {
- if (pModules)
- {
+ if (_pXmlFile->_wExport & EXPORT_DATA) {
+ if (pModules) {
INT i;
LPSTR p;
- for (i = 0; i < pModules->getCount(); i++)
- {
+ for (i = 0; i < pModules->getCount(); i++) {
p = (*pModules)[i];
-
- /*Filter/
- if (mir_stricmp(p, "Protocol") && !DB::Module::IsMeta(p))*/
- {
- ExportModule(p);
- }
+ ExportModule(p);
}
}
- else
- {
+ else {
ExportModule(USERINFO);
ExportModule(MOD_MBIRTHDAY);
}
@@ -225,9 +216,7 @@ INT CExImContactXML::ExportContact(DB::CEnumList* pModules)
// export contact's events
if (_pXmlFile->_wExport & EXPORT_HISTORY)
- {
ExportEvents();
- }
return ERROR_OK;
}
@@ -530,9 +519,10 @@ BOOLEAN CExImContactXML::ExportEvents()
xmlEvent->LinkEndChild(xmlText);
// find module
- for (xmlModule = _xmlNode->FirstChild(); xmlModule != NULL; xmlModule = xmlModule->NextSibling()) {
- if (!mir_stricmp(((TiXmlElement*)xmlModule)->Attribute("key"), dbei.szModule)) break;
- }
+ for (xmlModule = _xmlNode->FirstChild(); xmlModule != NULL; xmlModule = xmlModule->NextSibling())
+ if (!mir_stricmp(((TiXmlElement*)xmlModule)->Attribute("key"), dbei.szModule))
+ break;
+
// create new module
if (!xmlModule) {
xmlModule = _xmlNode->InsertEndChild(TiXmlElement(XKEY_MOD));
@@ -583,8 +573,10 @@ VOID CExImContactXML::CountKeys(DWORD &numSettings, DWORD &numEvents)
for (xkey = xmod->FirstChild();
xkey != NULL;
xkey = xkey->NextSibling()) {
- if (!mir_stricmp(xkey->Value(), XKEY_SET)) numSettings++;
- else numEvents++;
+ if (!mir_stricmp(xkey->Value(), XKEY_SET))
+ numSettings++;
+ else
+ numEvents++;
}
}
}