Changeset 589
- Timestamp:
- 10/23/06 03:45:15
- Files:
-
- qPingTool/branches/plone-2.5/Extensions/Install.py (modified) (2 diffs)
- qPingTool/branches/plone-2.5/PingTool.py (modified) (2 diffs)
- qPingTool/branches/plone-2.5/__init__.py (modified) (2 diffs)
- qPingTool/branches/plone-2.5/adapter.py (added)
- qPingTool/branches/plone-2.5/util.py (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
qPingTool/branches/plone-2.5/Extensions/Install.py
r588 r589 25 25 action='string:${portal_url}/'+TOOL_ID+'/folder_contents', 26 26 appId=PROJECTNAME, permission=ManagePortal, imageUrl='group.gif') 27 controlpanel_tool.unregisterConfiglet('prefs_set_canonical') 28 controlpanel_tool.registerConfiglet(id="prefs_set_canonical", name='Canonical URL setting' \ 29 ,category='Products', action='string:${portal_url}/prefs_set_canonical' \ 30 ,appId=PROJECTNAME, permission=ManagePortal, imageUrl='group.gif') 27 31 28 32 # Add 'portal_actionstool' to action provider list, if not yet exist … … 59 63 controlpanel_tool = getToolByName(portal, 'portal_controlpanel') 60 64 controlpanel_tool.unregisterConfiglet(TOOL_ID) 65 controlpanel_tool.unregisterConfiglet('prefs_set_canonical') 61 66 62 67 removeSkin(portal, ('ping_tool.pt',)) qPingTool/branches/plone-2.5/PingTool.py
r588 r589 15 15 from Products.XMLRPCMethod.XMLRPCMethod import RPCThread, XMLRPCMethod 16 16 from Products.CMFCore.utils import getToolByName 17 from util import getCanonicalURL 17 18 from zLOG import LOG 18 19 … … 87 88 title = blog.Title() 88 89 portal = context.portal_url.getPortalObject() 89 canonical_url = portal.getProperty('canonical_url', None)90 canonical_url = getCanonicalURL(context) 90 91 if canonical_url: 91 92 #return "failure", "Please setup 'canonical_url' property for your Plone site" qPingTool/branches/plone-2.5/__init__.py
r588 r589 7 7 from config import * 8 8 9 9 try: 10 from adapter import registerAdapter 11 registerAdapter() 12 except: 13 from Products.CMFCore.utils import getToolByName 14 from Products.CMFPlone.URLTool import URLTool 15 def getCanonicalURL(self): 16 portal = getToolByName(self, 'portal_url').getPortalObject() 17 return portal.getProperty('canonical_url', None) 18 #URLTool.security.declarePublic('getCanonicalURL') 19 URLTool.getCanonicalURL = getCanonicalURL 10 20 11 21 12 22 registerDirectory(SKINS_DIR, GLOBALS) 13 14 23 tools = ( PingTool.PingTool, ) 15 24 16 25 def initialize(context): 26 from AccessControl import allow_module 27 allow_module('Products.qPingTool.util') 28 17 29 utils.ToolInit("PingTool", tools=tools, product_name=PROJECTNAME, icon=TOOL_ICON, 18 30 ).initialize(context) … … 27 39 fti = ftis, 28 40 ).initialize(context) 41
