[Erp5-report] r15806 - /erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Aug 24 23:23:48 CEST 2007


Author: nicolas
Date: Fri Aug 24 23:23:48 2007
New Revision: 15806

URL: http://svn.erp5.org?rev=15806&view=rev
Log:
Dont send max value without activities, code simplification

Modified:
    erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py

Modified: erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py?rev=15806&r1=15805&r2=15806&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py (original)
+++ erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py Fri Aug 24 23:23:48 2007
@@ -912,11 +912,9 @@
             set_synchronized = 0
             # This object has changed on this side, we have to generate some xmldiff
             if subscriber.getMediaType() == self.MEDIA_TYPE['TEXT_XML']:
-              xml_string = self.getXupdateObject(
-                                      domain.getXMLFromObject(object),
-                                      signature.getXML())
+              xml_string = self.getXupdateObject(xml_object, signature.getXML())
             else: #if there is no xml, we re-send all the object
-              xml_string=domain.getXMLFromObject(object)
+              xml_string = xml_object
             if xml_string.count('\n') > self.MAX_LINES:
               # This make comment fails, so we need to replace
               if xml_string.find('--') >= 0:
@@ -936,7 +934,7 @@
               xml_string = '<!--' + ''.join(short_string_list) + '-->'
             signature.setStatus(status)
             if subscriber.getMediaType() != self.MEDIA_TYPE['TEXT_XML']:
-              xml_string = domain.getXMLFromObject(object)
+              xml_string = xml_object
             rid = signature.getRid()#in fisrt, we try with rid if there is one
             gid = signature.getGid()
             syncml_data += self.replaceXMLObject(
@@ -1446,7 +1444,7 @@
                              subscriber=subscriber,
                              cmd_id=cmd_id,xml_confirmation=xml_confirmation,
                              conduit=conduit,
-                             max=self.MAX_OBJECTS)
+                             max=None)
       syncml_data = result['syncml_data']
       xml_confirmation = result['xml_confirmation']
       cmd_id = result['cmd_id']




More information about the Erp5-report mailing list