[Erp5-report] r27163 - /erp5/trunk/products/ERP5/Document/WebSection.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon May 25 18:42:11 CEST 2009


Author: kazuhiko
Date: Mon May 25 18:42:08 2009
New Revision: 27163

URL: http://svn.erp5.org?rev=27163&view=rev
Log:
register current web site physical path for later URL generation in WebSection.__call__() too, otherwise it is not set in accessing web site root, and it's default document's absolute_url() value is 'http://host/erp5/web_page_module/page_id' instead of 'http://host/erp5/web_site_module/site_id/web_page_module/page_id'

Modified:
    erp5/trunk/products/ERP5/Document/WebSection.py

Modified: erp5/trunk/products/ERP5/Document/WebSection.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/WebSection.py?rev=27163&r1=27162&r2=27163&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/WebSection.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/WebSection.py [utf8] Mon May 25 18:42:08 2009
@@ -169,6 +169,9 @@
         We use REQUEST parameters so that they are reset for every
         Web transaction and can be accessed from widgets. 
       """
+      # Register current web site physical path for later URL generation
+      if self.REQUEST.get(self.web_section_key, MARKER) is MARKER:
+        self.REQUEST[self.web_section_key] = self.getPhysicalPath()
       self.REQUEST.set('current_web_section', self)
       if not self.REQUEST.get('editable_mode') and not self.REQUEST.get('ignore_layout'):
         # Try to use a custom renderer if any




More information about the Erp5-report mailing list