[CMF-checkins] CVS: Products/CMFWiki/Extensions - Install.py:1.3

Tres Seaver tseaver@zope.com
Tue, 7 Aug 2001 18:20:58 -0400


Update of /cvs-repository/Products/CMFWiki/Extensions
In directory cvs.zope.org:/tmp/cvs-serv11333/Extensions

Modified Files:
	Install.py 
Log Message:


 - Fixup help window size.

 - Register / add 'zpt_wiki' skins.


=== Products/CMFWiki/Extensions/Install.py 1.2 => 1.3 ===
         path = skinstool.getSkinPath(skin)
         path = map(string.strip, string.split(path,','))
-        if 'wiki' not in path:
-            path.append('wiki')
-            path = string.join(path, ', ')
-            # addSkinSelection will replace existing skins as well.
-            skinstool.addSkinSelection(skin, path)
-            out.write("Added 'wiki' to %s skin\n" % skin)
-        else:
-            out.write("Skipping %s skin, 'wiki' is already set up\n" % (
-                skin))
+        for dir in ( 'wiki', 'zpt_wiki' ):
+
+            if not dir in path:
+                try:
+                    idx = path.index( 'custom' )
+                except ValueError:
+                    idx = 999
+                path.insert( idx+1, dir )
+
+        path = string.join(path, ', ')
+        # addSkinSelection will replace existing skins as well.
+        skinstool.addSkinSelection(skin, path)
+        out.write("Added 'wiki' and 'zpt_wiki' to %s skin\n" % skin)
 
     # remove workflow for Wiki pages
     cbt = workflowtool._chains_by_type