[Fusionforge-commits] r14656 - in trunk: . src/plugins/moinmoin/lib

Roland Mas lolando at fusionforge.org
Fri Oct 14 18:08:14 CEST 2011


Author: lolando
Date: 2011-10-14 18:08:14 +0200 (Fri, 14 Oct 2011)
New Revision: 14656

Modified:
   trunk/
   trunk/src/plugins/moinmoin/lib/farmconfig.py
Log:
Allow projects to define a page header in their moinmoin plugin.
For K818-007.


Modified: trunk/src/plugins/moinmoin/lib/farmconfig.py
===================================================================
--- trunk/src/plugins/moinmoin/lib/farmconfig.py	2011-10-14 16:08:06 UTC (rev 14655)
+++ trunk/src/plugins/moinmoin/lib/farmconfig.py	2011-10-14 16:08:14 UTC (rev 14656)
@@ -3,6 +3,8 @@
 from MoinMoin.config import multiconfig
 import fusionforge
 import string
+import logging
+import os
 
 class FarmConfig(multiconfig.DefaultConfig):
 
@@ -20,7 +22,6 @@
 
     sitename = u'ForgeWiki' # [Unicode]
     interwikiname = u'ForgeWiki' # [Unicode]
-
     acl_rights_default = \
       string.join (map (lambda u: u+":read,write,delete,revert,admin",
                         ffsa.admins)
@@ -33,6 +34,11 @@
         self.data_dir = '/var/lib/gforge/plugins/moinmoin/wikidata/%s/data' % project_name
         self.data_underlay_dir = '/var/lib/gforge/plugins/moinmoin/wikidata/%s/underlay' % project_name
 
+        page_header1_file = '/var/lib/gforge/chroot/home/groups/%s/plugins/moinmoin/page_header1.html' % project_name
+        if os.path.exists(page_header1_file):
+            with open(page_header1_file) as f:
+                self.page_header1 = f.read()
+
         self.acl_rights_default = self.ffsa.get_moinmoin_acl_string(project_name)
 
         # Call inherited constructor once instance specific variables




More information about the Fusionforge-commits mailing list