Changeset 1515 in products for quintagroup.seoptimizer
- Timestamp:
- Jan 4, 2010 6:55:19 PM (14 years ago)
- Location:
- quintagroup.seoptimizer/trunk/quintagroup/seoptimizer
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/profiles/uninstall/import_steps.xml
r424 r1515 2 2 <import-steps> 3 3 <import-step id="seo_uninstall" version="20081125-01" 4 handler="quintagroup.seoptimizer. util.uninstall"4 handler="quintagroup.seoptimizer.setuphandlers.uninstall" 5 5 title="SEO uninstallation"> 6 6 SEO uninstallation -
quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/util.py
r1509 r1515 1 1 from Globals import InitializeClass 2 2 from AccessControl import ClassSecurityInfo 3 from Products.CMFCore.utils import getToolByName4 3 5 4 def createMultiColumnList(self,slist, numCols, sort_on='title_or_id'): … … 47 46 except: 48 47 pass 49 50 def removeSkin(self, layer):51 """ Remove layers.52 """53 skinstool = getToolByName(self, 'portal_skins')54 for skinName in skinstool.getSkinSelections():55 original_path = skinstool.getSkinPath(skinName)56 original_path = [l.strip() for l in original_path.split(',')]57 new_path= []58 for l in original_path:59 if (l == layer) or (l.startswith(layer+'/')):60 continue61 new_path.append(l)62 skinstool.addSkinSelection(skinName, ','.join(new_path))63 64 def removeActions(self):65 """ Remove actions.66 """67 tool = getToolByName(self, 'portal_types')68 for ptype in tool.objectValues():69 if ptype.getId() in ['File','Document','News Item']:70 acts = filter(lambda x: x.id == 'seo_properties', ptype.listActions())71 action = acts and acts[0] or None72 if action != None:73 acts = list(ptype.listActions())74 ptype.deleteActions([acts.index(a) for a in acts if a.getId()=='seo_properties'])75 76 def remove_configlets( context, conf_ids ):77 """ Remove configlets.78 """79 configTool = getToolByName(context, 'portal_controlpanel', None)80 if configTool:81 for id in conf_ids:82 configTool.unregisterConfiglet(id)83 84 def uninstall( context ):85 """ Do customized uninstallation.86 """87 if context.readDataFile('seo_uninstall.txt') is None:88 return89 site = context.getSite()90 removeSkin( site, 'quintagroup.seoptimizer' )91 removeActions( site )92 remove_configlets( site, ('quintagroup.seoptimizer',))93
Note: See TracChangeset
for help on using the changeset viewer.