Commit fefb57f5 authored by Sebastien Robin's avatar Sebastien Robin

bugs fixed after many methods were renamed


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@337 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 99f21467
...@@ -219,7 +219,7 @@ class Publication(SyncCode): ...@@ -219,7 +219,7 @@ class Publication(SyncCode):
""" """
for f in range(len(self.list_subscribers)): for f in range(len(self.list_subscribers)):
if self.list_subscribers[f].subscription_url == subscription_url: if self.list_subscribers[f].subscription_url == subscription_url:
self.list_subscribers = self.list_subsscribers[0:f] + self.list_subscribers[f+1:len(self.list_subscribers)] self.list_subscribers = self.list_subscribers[0:f] + self.list_subscribers[f+1:len(self.list_subscribers)]
def resetAllSubscribers(self): def resetAllSubscribers(self):
""" """
......
...@@ -32,6 +32,7 @@ from Subscription import Signature ...@@ -32,6 +32,7 @@ from Subscription import Signature
from xml.dom.ext.reader.Sax2 import FromXmlStream, FromXml from xml.dom.ext.reader.Sax2 import FromXmlStream, FromXml
from XMLSyncUtils import XMLSyncUtils from XMLSyncUtils import XMLSyncUtils
from Conduit.ERP5Conduit import ERP5Conduit from Conduit.ERP5Conduit import ERP5Conduit
from Products.CMFCore.utils import getToolByName
import commands import commands
from zLOG import LOG from zLOG import LOG
...@@ -153,12 +154,15 @@ class PublicationSynchronization(XMLSyncUtils): ...@@ -153,12 +154,15 @@ 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.list_publications[id].getSubscriber(subscription_url) #subscriber = self.list_publications[id].getSubscriber(subscription_url)
subscriber = self.getPublication(id).getSubscriber(subscription_url)
LOG('PubSync.getPublication: ',0,self.getPublication(id))
#LOG('PubSync.getSubscriber: ',0,self.getPublication(id))
#file.close() #file.close()
if subscriber == None: if subscriber == None:
subscriber = Subscriber(subscription_url) subscriber = Subscriber(subscription_url)
# FIXME: Why can't we use the method addSubscriber ?? # FIXME: Why can't we use the method addSubscriber ??
self.list_publications[id].addSubscriber(subscriber) self.getPublication(id).addSubscriber(subscriber)
# first synchronization # first synchronization
self.PubSyncInit(self.list_publications[id],xml_client,subscriber=subscriber) self.PubSyncInit(self.list_publications[id],xml_client,subscriber=subscriber)
......
...@@ -242,9 +242,18 @@ class SynchronizationTool( UniqueObject, SimpleItem, ...@@ -242,9 +242,18 @@ class SynchronizationTool( UniqueObject, SimpleItem,
# SynchronizationTool, XXX To be removed # SynchronizationTool, XXX To be removed
self.list_publications = PersistentMapping() self.list_publications = PersistentMapping()
for key in self.list_publications.keys(): for key in self.list_publications.keys():
LOG('getPublicationList',0,'key: %s, pub:%s' % (key,repr(self.list_publications[key])))
return_list += [self.list_publications[key]] return_list += [self.list_publications[key]]
return return_list return return_list
security.declareProtected(Permissions.AccessContentsInformation,'getPublication')
def getPublication(self, id):
"""
Return a list of publications
"""
#self.list_publications=PersistentMapping()
return self.list_publications[id]
security.declareProtected(Permissions.AccessContentsInformation,'getSubscriptionList') security.declareProtected(Permissions.AccessContentsInformation,'getSubscriptionList')
def getSubscriptionList(self): def getSubscriptionList(self):
""" """
......
...@@ -625,6 +625,7 @@ class XMLSyncUtils(XMLSyncUtilsMixin): ...@@ -625,6 +625,7 @@ class XMLSyncUtils(XMLSyncUtilsMixin):
has_next_action = 0 has_next_action = 0
if next_action is not None: if next_action is not None:
has_next_action = 1 has_next_action = 1
LOG('SyncModif, has_next_action:',0,has_next_action)
conduit = ERP5Conduit() conduit = ERP5Conduit()
xml_confirmation = '' xml_confirmation = ''
while next_action != None: while next_action != None:
......
...@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
<dtml-var manage_tabs> <dtml-var manage_tabs>
<form action="manage_addPublicationForm"> <form action="manage_addPublicationForm">
<input type="submit" name="addPublication:method" value="Add a publication"> <input type="submit" name="manage_addPublication:method" value="Add a publication">
</form> </form>
<dtml-in getPublicationList> <dtml-in getPublicationList>
......
...@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
<dtml-var manage_tabs> <dtml-var manage_tabs>
<form action="manage_addSubscriptionForm"> <form action="manage_addSubscriptionForm">
<input type="submit" name="addSubscription:method" value="Add a Subscription"> <input type="submit" name="manage_addSubscriptionForm:method" value="Add a Subscription">
</form> </form>
<dtml-in getSubscriptionList> <dtml-in getSubscriptionList>
......
...@@ -11,3 +11,8 @@ Setting up Synchronization ...@@ -11,3 +11,8 @@ Setting up Synchronization
If you want the synchronization working with CPS, you will need If you want the synchronization working with CPS, you will need
need the ERP5CPS products, available on the nexedi cvs. need the ERP5CPS products, available on the nexedi cvs.
Installing the synchronization tool
Actually you need to add a 'CMFMailin Tool', there is nothing to configure.
Then you have to make sure you get the right mail_received.py. And
Finally you should add the ERP5SyncML Tool.
\ No newline at end of file
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