Changeset 2538 in products for quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/content
- Timestamp:
- Jun 16, 2010 2:28:02 PM (14 years ago)
- Location:
- quintagroup.plonegooglesitemaps/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.plonegooglesitemaps/trunk
- Property svnmerge-integrated changed from /quintagroup.plonegooglesitemaps/branches/test_refactoring:1-3563 to /quintagroup.plonegooglesitemaps/branches/test_refactoring:1-3576
- Property svn:mergeinfo set to /quintagroup.plonegooglesitemaps/branches/test_refactoring:2527-2536
-
quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/content/sitemap.py
r2406 r2538 158 158 """ 159 159 self.getField('pingTransitions').set(self, value) 160 if not IS_PLONE_3:161 # Update Workflow if needed162 pw = getToolByName(self, 'portal_workflow')163 #ping_googlesitemap = PING_EMETHODS_MAP[self.getSitemapType()]164 transmap = {}165 for key in value:166 if key.find('#')>0:167 ids = key.split('#')168 wfid = ids[0]169 if not wfid in transmap.keys():170 transmap[wfid]=[]171 transmap[wfid].append(ids[1])172 for wfid in transmap.keys():173 workflow = pw.getWorkflowById(wfid)174 if ping_googlesitemap not in workflow.scripts.objectIds():175 workflow.scripts.manage_addProduct['ExternalMethod'].manage_addExternalMethod(176 ping_googlesitemap,177 'Ping sitemap',178 'quintagroup.plonegooglesitemaps.ping_googlesitemap',179 ping_googlesitemap)180 transitions_set = transmap[wfid]181 for transition in workflow.transitions.values():182 trid = transition.id183 tras = transition.after_script_name184 if (tras == '') and (trid in transitions_set):185 #set186 after_script = ping_googlesitemap187 elif (tras == ping_googlesitemap) and not (trid in transitions_set):188 #reset189 after_script = ''190 else:191 #avoid properties set192 continue193 transition.setProperties(title=transition.title,194 new_state_id=transition.new_state_id,195 after_script_name=after_script,196 actbox_name=transition.actbox_name)197 160 198 161 atapi.registerType(Sitemap, PROJECTNAME)
Note: See TracChangeset
for help on using the changeset viewer.