[Zope-Checkins] SVN: Zope/branches/2.12/ - fixed ProductHelp (reverted small part of revision 94458)

Yvo Schubbe y.2009 at wcm-solutions.de
Fri Jul 3 07:32:53 EDT 2009


Log message for revision 101433:
  - fixed ProductHelp (reverted small part of revision 94458)

Changed:
  U   Zope/branches/2.12/doc/CHANGES.rst
  UU  Zope/branches/2.12/src/App/Product.py

-=-
Modified: Zope/branches/2.12/doc/CHANGES.rst
===================================================================
--- Zope/branches/2.12/doc/CHANGES.rst	2009-07-03 11:28:46 UTC (rev 101432)
+++ Zope/branches/2.12/doc/CHANGES.rst	2009-07-03 11:32:52 UTC (rev 101433)
@@ -19,6 +19,8 @@
 Bugs Fixed
 ++++++++++
 
+- App.Product: ProductHelp was broken since Zope 2.12.0a1.
+
 - ObjectManagerNameChooser now also works with BTreeFolder2.
 
 - Correctly handle unauthorized exceptions in the ZPublisherExceptionHook.

Modified: Zope/branches/2.12/src/App/Product.py
===================================================================
--- Zope/branches/2.12/src/App/Product.py	2009-07-03 11:28:46 UTC (rev 101432)
+++ Zope/branches/2.12/src/App/Product.py	2009-07-03 11:32:52 UTC (rev 101433)
@@ -99,9 +99,19 @@
     _reserved_names=('Help',)
 
     def __init__(self, id, title):
+        from HelpSys.HelpSys import ProductHelp
+
         self.id=id
         self.title=title
 
+        # Workaround for unknown problem with help system and PluginIndexes product
+        # NEEDS to be fixed for 2.4 ! (ajung)
+
+        try:
+            self._setObject('Help', ProductHelp('Help', id))
+        except:
+            pass
+
     security.declarePublic('Destination')
     def Destination(self):
         "Return the destination for factory output"
@@ -129,7 +139,9 @@
         """Returns the ProductHelp object associated with the Product.
         """
         from HelpSys.HelpSys import ProductHelp
-        return ProductHelp('Help', self.id).__of__(self)
+        if not hasattr(self, 'Help'):
+            self._setObject('Help', ProductHelp('Help', self.id))
+        return self.Help
 
     #
     # Product refresh


Property changes on: Zope/branches/2.12/src/App/Product.py
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
   - 1.67
Added: svn:keywords
   + Id



More information about the Zope-Checkins mailing list