[Checkins] SVN: Products.CMFDefault/branches/2.1/Products/CMFDefault/ skins/zpt_generic/permalink.py: fix typos, wrap object correctly.

Tres Seaver tseaver at palladion.com
Tue Nov 18 13:17:17 EST 2008


Log message for revision 93094:
  skins/zpt_generic/permalink.py: fix typos, wrap object correctly.
  
  o  See: https://bugs.launchpad.net/bugs/299058 .
  

Changed:
  U   Products.CMFDefault/branches/2.1/Products/CMFDefault/CHANGES.txt
  U   Products.CMFDefault/branches/2.1/Products/CMFDefault/skins/zpt_generic/permalink.py

-=-
Modified: Products.CMFDefault/branches/2.1/Products/CMFDefault/CHANGES.txt
===================================================================
--- Products.CMFDefault/branches/2.1/Products/CMFDefault/CHANGES.txt	2008-11-18 18:11:26 UTC (rev 93093)
+++ Products.CMFDefault/branches/2.1/Products/CMFDefault/CHANGES.txt	2008-11-18 18:17:17 UTC (rev 93094)
@@ -4,6 +4,8 @@
 2.1.3-beta (unreleased)
 -----------------------
 
+- skins/zpt_generic/permalink.py: fix typos, wrap object correctly.
+  See: https://bugs.launchpad.net/bugs/299058 .
 
 2.1.2 (2008-09-13)
 ------------------

Modified: Products.CMFDefault/branches/2.1/Products/CMFDefault/skins/zpt_generic/permalink.py
===================================================================
--- Products.CMFDefault/branches/2.1/Products/CMFDefault/skins/zpt_generic/permalink.py	2008-11-18 18:11:26 UTC (rev 93093)
+++ Products.CMFDefault/branches/2.1/Products/CMFDefault/skins/zpt_generic/permalink.py	2008-11-18 18:17:17 UTC (rev 93094)
@@ -10,7 +10,7 @@
 from Products.CMFCore.utils import getUtilityByInterfaceName
 
 subpath = traverse_subpath[0]
-uid_handler=getUtilityByInterfaceName('Products.CMFUid.interfaces.UniqueIDHandler')
+uid_handler=getUtilityByInterfaceName('Products.CMFUid.interfaces.IUniqueIdHandler')
 
 # appending 'isAvailable' instead of a unique id returns if
 # the site permalink feature is available.
@@ -23,9 +23,11 @@
     return str(int(isAvailable))
 
 obj = uid_handler.getObject(subpath)
+# workarround for an acquisition wrapping problem.
+obj = context.restrictedTraverse(obj.getPhysicalPath())
 
 ti = obj.getTypeInfo()
-method_id = ti and ti.queryMethodID('view', context=self)
+method_id = ti and ti.queryMethodID('view', context=obj)
 if method_id:
     return getattr(obj, method_id)()
 return obj()



More information about the Checkins mailing list