Author: jure
Date: Wed Mar 27 14:05:07 2013
New Revision: 1461584

URL: http://svn.apache.org/r1461584
Log:
#406 follow up, properly setup wiki pages, also don't auto redirect wiki URLs 
to default product


Modified:
    
bloodhound/branches/bep_0003_multiproduct/bloodhound_dashboard/bhdashboard/admin.py
    
bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/web_ui.py

Modified: 
bloodhound/branches/bep_0003_multiproduct/bloodhound_dashboard/bhdashboard/admin.py
URL: 
http://svn.apache.org/viewvc/bloodhound/branches/bep_0003_multiproduct/bloodhound_dashboard/bhdashboard/admin.py?rev=1461584&r1=1461583&r2=1461584&view=diff
==============================================================================
--- 
bloodhound/branches/bep_0003_multiproduct/bloodhound_dashboard/bhdashboard/admin.py
 (original)
+++ 
bloodhound/branches/bep_0003_multiproduct/bloodhound_dashboard/bhdashboard/admin.py
 Wed Mar 27 14:05:07 2013
@@ -92,6 +92,10 @@ class BloodhoundAdmin(Component):
         guide pages.
         """
 
+        # set global product scope on wiki pages
+        with self.env.db_direct_transaction as db:
+            db("UPDATE wiki SET product=''")
+
         wiki_admin = WikiAdmin(self.env)
         pages = wiki_admin.get_wiki_list()
         for old_name in pages:
@@ -118,9 +122,6 @@ class BloodhoundAdmin(Component):
                     comment = 'Bloodhound guide update'
                     redirection.save('bloodhound', comment, '0.0.0.0')
         self._do_wiki_rename_links('TracGuideToc', 'UserGuideToc')
-        
-        pages =  pkg_resources.resource_filename('bhdashboard', 
'default-pages')
-        wiki_admin.load_pages(pages, create_only=['WikiStart', 'InterMapTxt'])
 
     def _do_wiki_rename_links(self, old_name, new_name):
         import re

Modified: 
bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/web_ui.py
URL: 
http://svn.apache.org/viewvc/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/web_ui.py?rev=1461584&r1=1461583&r2=1461584&view=diff
==============================================================================
--- 
bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/web_ui.py
 (original)
+++ 
bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/web_ui.py
 Wed Mar 27 14:05:07 2013
@@ -37,7 +37,7 @@ from multiproduct.model import Product
 from multiproduct.api import DEFAULT_PRODUCT
 
 PRODUCT_RE = re.compile(r'^/products/(?P<pid>[^/]*)(?P<pathinfo>.*)')
-REDIRECT_DEFAULT_RE = 
re.compile(r'^/(?P<section>milestone|roadmap|query|report|newticket|ticket|wiki|qct|timeline|(raw-|zip-)?attachment|diff|batchmodify|search)(?P<pathinfo>.*)')
+REDIRECT_DEFAULT_RE = 
re.compile(r'^/(?P<section>milestone|roadmap|query|report|newticket|ticket|qct|timeline|(raw-|zip-)?attachment|diff|batchmodify|search)(?P<pathinfo>.*)')
 
 class ProductModule(Component):
     """Base Product behaviour"""


Reply via email to