[Erp5-report] r32176 fabien - /erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Feb 2 14:03:27 CET 2010


Author: fabien
Date: Tue Feb  2 14:03:26 2010
New Revision: 32176

URL: http://svn.erp5.org?rev=32176&view=rev
Log:
2010-02-02 fabien
* remove WebSection_getPermanentURLForView which was bad (see bug #1507) and use getPermanentUrl() from WebSection.py.
* WebSection_getPermanentUrl script is not used anymore (and should never be used, it should be called only by getPermanentUrl() from WebSection.py). Now by default, getPermanentUrl(document) always return a link to html content. If you want to get a link to a file (ie. openoffice document, pdf document, ...) you should explicitly specify it :
getPermanentUrl(document, view=False)

Reviewed by Kazuhiko

Removed:
    erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getPermanentURLForView.xml

Removed: erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getPermanentURLForView.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getPermanentURLForView.xml?rev=32175&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getPermanentURLForView.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getPermanentURLForView.xml (removed)
@@ -1,137 +1,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <tuple>
-        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
-        <tuple/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>Script_magic</string> </key>
-            <value> <int>3</int> </value>
-        </item>
-        <item>
-            <key> <string>_bind_names</string> </key>
-            <value>
-              <object>
-                <klass>
-                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
-                </klass>
-                <tuple/>
-                <state>
-                  <dictionary>
-                    <item>
-                        <key> <string>_asgns</string> </key>
-                        <value>
-                          <dictionary>
-                            <item>
-                                <key> <string>name_container</string> </key>
-                                <value> <string>container</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_context</string> </key>
-                                <value> <string>context</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_m_self</string> </key>
-                                <value> <string>script</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_subpath</string> </key>
-                                <value> <string>traverse_subpath</string> </value>
-                            </item>
-                          </dictionary>
-                        </value>
-                    </item>
-                  </dictionary>
-                </state>
-              </object>
-            </value>
-        </item>
-        <item>
-            <key> <string>_body</string> </key>
-            <value> <string>"""\n
-  return permanent url with "/view" add the end of the url for all portal_type\n
-  different from Web Page (Web Page can be displayed without "/view" and it\'s\n
-  better for cache).\n
-"""\n
-permanent_url = context.WebSection_getPermanentURL(document)\n
-\n
-# for web page, foo and foo/view are completely same\n
-portal_type = document.getPortalType()\n
-if portal_type == \'Web Page\':\n
-  return permanent_url\n
-else:\n
-  return "%s/view" % permanent_url\n
-</string> </value>
-        </item>
-        <item>
-            <key> <string>_code</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>_params</string> </key>
-            <value> <string>document</string> </value>
-        </item>
-        <item>
-            <key> <string>errors</string> </key>
-            <value>
-              <tuple/>
-            </value>
-        </item>
-        <item>
-            <key> <string>func_code</string> </key>
-            <value>
-              <object>
-                <klass>
-                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
-                </klass>
-                <tuple/>
-                <state>
-                  <dictionary>
-                    <item>
-                        <key> <string>co_argcount</string> </key>
-                        <value> <int>1</int> </value>
-                    </item>
-                    <item>
-                        <key> <string>co_varnames</string> </key>
-                        <value>
-                          <tuple>
-                            <string>document</string>
-                            <string>_getattr_</string>
-                            <string>context</string>
-                            <string>permanent_url</string>
-                            <string>portal_type</string>
-                          </tuple>
-                        </value>
-                    </item>
-                  </dictionary>
-                </state>
-              </object>
-            </value>
-        </item>
-        <item>
-            <key> <string>func_defaults</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>WebSection_getPermanentURLForView</string> </value>
-        </item>
-        <item>
-            <key> <string>warnings</string> </key>
-            <value>
-              <tuple/>
-            </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>




More information about the Erp5-report mailing list