Commit 71d63eb1 authored by Jean-Paul Smets's avatar Jean-Paul Smets

fixed self into publication in PubSync


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2091 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 27711a6b
...@@ -136,11 +136,11 @@ class PublicationSynchronization(XMLSyncUtils): ...@@ -136,11 +136,11 @@ class PublicationSynchronization(XMLSyncUtils):
if subnode.nodeType == subnode.ELEMENT_NODE and subnode.nodeName == "Source": if subnode.nodeType == subnode.ELEMENT_NODE and subnode.nodeName == "Source":
subscription_url = str(subnode.childNodes[0].data) subscription_url = str(subnode.childNodes[0].data)
# Get the subscriber or create it if not already in the list # Get the subscriber or create it if not already in the list
subscriber = self.getPublication(id).getSubscriber(subscription_url) subscriber = publication.getSubscriber(subscription_url)
if subscriber == None: if subscriber == None:
subscriber = Subscriber(self.generateNewId(),subscription_url) subscriber = Subscriber(publication.generateNewId(),subscription_url)
subscriber.setXMLMapping(publication.getXMLMapping()) subscriber.setXMLMapping(publication.getXMLMapping())
self.getPublication(id).addSubscriber(subscriber) publication.addSubscriber(subscriber)
# first synchronization # first synchronization
result = self.PubSyncInit(publication,xml_client,subscriber=subscriber,sync_type=self.SLOW_SYNC) result = self.PubSyncInit(publication,xml_client,subscriber=subscriber,sync_type=self.SLOW_SYNC)
...@@ -153,7 +153,7 @@ class PublicationSynchronization(XMLSyncUtils): ...@@ -153,7 +153,7 @@ class PublicationSynchronization(XMLSyncUtils):
elif subscriber is not None: elif subscriber is not None:
# This looks like we are starting a synchronization after # This looks like we are starting a synchronization after
# a conflict resolution by the user # a conflict resolution by the user
result = self.PubSyncInit(publication=self.getPublication(id), result = self.PubSyncInit(publication=publication,
xml_client=None, subscriber=subscriber,sync_type=self.TWO_WAY) xml_client=None, subscriber=subscriber,sync_type=self.TWO_WAY)
if RESPONSE is not None: if RESPONSE is not None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment