Log message for revision 114494: Avoid using the ``Products.PythonScripts.standard`` module inside the database manager ZMI.
Changed: U Zope/trunk/doc/CHANGES.rst U Zope/trunk/src/App/ApplicationManager.py U Zope/trunk/src/App/www/chooseDatabase.pt -=- Modified: Zope/trunk/doc/CHANGES.rst =================================================================== --- Zope/trunk/doc/CHANGES.rst 2010-07-10 10:37:19 UTC (rev 114493) +++ Zope/trunk/doc/CHANGES.rst 2010-07-10 10:42:23 UTC (rev 114494) @@ -22,6 +22,9 @@ Restructuring +++++++++++++ +- Avoid using the ``Products.PythonScripts.standard`` module inside the + database manager ZMI. + - Factored out the `Products.MIMETools` and `Products.ExternalMethod` packages into their own distributions. Modified: Zope/trunk/src/App/ApplicationManager.py =================================================================== --- Zope/trunk/src/App/ApplicationManager.py 2010-07-10 10:37:19 UTC (rev 114493) +++ Zope/trunk/src/App/ApplicationManager.py 2010-07-10 10:42:23 UTC (rev 114494) @@ -20,6 +20,7 @@ import os import sys import time +import urllib from AccessControl.class_init import InitializeClass from AccessControl.requestmethod import requestmethod @@ -109,10 +110,12 @@ def __init__(self, id): self.id = id - def getDatabaseNames(self): + def getDatabaseNames(self, quote=False): configuration = getConfiguration() names = configuration.dbtab.listDatabaseNames() names.sort() + if quote: + return [(name, urllib.quote(name)) for name in names] return names def __getitem__(self, name): Modified: Zope/trunk/src/App/www/chooseDatabase.pt =================================================================== --- Zope/trunk/src/App/www/chooseDatabase.pt 2010-07-10 10:37:19 UTC (rev 114493) +++ Zope/trunk/src/App/www/chooseDatabase.pt 2010-07-10 10:42:23 UTC (rev 114494) @@ -1,18 +1,18 @@ -<h1 tal:replace="structure here/manage_page_header" /> -<h2 tal:replace="structure here/manage_tabs" /> +<h1 tal:replace="structure context/manage_page_header" /> +<h2 tal:replace="structure context/manage_tabs" /> <h3>Databases</h3> -<table tal:define="url_quote nocall: - modules/Products/PythonScripts/standard/url_quote"> -<tr tal:repeat="name here/getDatabaseNames"> -<td tal:define="qname python: url_quote(name)"> +<table tal:define="databases python:context.getDatabaseNames(quote=True);"> +<tr tal:repeat="info databases"> +<td tal:define="name python: info[0]; + qname python: info[1]"> <img src="/p_/DatabaseManagement_icon" tal:attributes="src string:${request/BASE1}/p_/DatabaseManagement_icon" /> <a tal:content="name" tal:attributes="href - string:${here/absolute_url}/${qname}/manage_main">Main</a> + string:${context/absolute_url}/${qname}/manage_main">Main</a> </td> </tr> </table> -<h1 tal:replace="structure here/manage_page_footer" /> +<h1 tal:replace="structure context/manage_page_footer" /> _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins