[Zope-CMF] Coments on Z2.5b1 with CMF and friends

Tres Seaver tseaver@zope.com
Mon, 03 Dec 2001 08:20:43 -0500


Joseph Wayne Norton wrote:

> Here's a tiny patch for this issue.  I made a similiar change a while
> back but had never posted this to the collector.


Thanks for the patch.  I don't see how it can (quite) be doing what you
expect, however, unless you also patched CMFWikiPage.py as follows to
do something with the title passed from the form:

Index: CMFWikiPage.py
===================================================================
RCS file: /cvs-repository/CMF/CMFWiki/CMFWikiPage.py,v
retrieving revision 1.19
diff -u -r1.19 CMFWikiPage.py
--- CMFWikiPage.py      21 Nov 2001 22:24:09 -0000      1.19
+++ CMFWikiPage.py      3 Dec 2001 14:20:02 -0000
@@ -499,6 +499,7 @@
              self.last_log = log
          else:
              self.last_log = None
+        self.title=title
          if text is not None:
              self.username = username
              t = text
@@ -1276,6 +1277,8 @@

      security.declarePublic('title_or_id')
      def title_or_id(self):
+        if self.title:
+            return self.title
          fid = self._my_folder().getId()
          return "%s of %s" % (self.getId(), fid)

@@ -1870,6 +1873,10 @@
      def PUT_factory(self, name, typ, body):
          if find(typ, 'text') != -1:
              return makeCMFWikiPage(name, '', body)
+
+    def Title(self): # for CMFCatalog
+        fp = getattr( self, 'FrontPage', None )
+        return fp and fp.Title() or self.title_or_id()

  def makeCMFWikiPage(id, title, file):
      ob = CMFWikiPage(source_string=file, __name__=id)


I am about to check this in, along with your patch.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com