Commit 92e41a53 authored by Hanno Schlichting's avatar Hanno Schlichting

On the application object, removed `PrincipiaTime` in favor of `ZopeTime` and...

On the application object, removed `PrincipiaTime` in favor of `ZopeTime` and `PrincipiaRedirect` in favor of `Redirect` or `ZopeRedirect`.
parent f1547f0d
......@@ -44,6 +44,9 @@ Features Added
Restructuring
+++++++++++++
- On the application object, removed `PrincipiaTime` in favor of `ZopeTime` and
`PrincipiaRedirect` in favor of `Redirect` or `ZopeRedirect`.
- Removed `OFS.DefaultObservable` - an early predecessor of `zope.event`.
- Removed `mime-types` option from `zope.conf`. You can use the `add_files`
......
......@@ -102,13 +102,13 @@ class Application(ApplicationDefaultPermissions,
def Control_Panel(self):
return APP_MANAGER.__of__(self)
def PrincipiaRedirect(self, destination, URL1):
def Redirect(self, destination, URL1):
"""Utility function to allow user-controlled redirects"""
if destination.find('//') >= 0:
raise RedirectException, destination
raise RedirectException, ("%s/%s" % (URL1, destination))
Redirect = ZopeRedirect = PrincipiaRedirect
ZopeRedirect = Redirect
def __bobo_traverse__(self, REQUEST, name=None):
if name == 'Control_Panel':
......@@ -134,11 +134,9 @@ class Application(ApplicationDefaultPermissions,
except AttributeError:
raise KeyError, name
def PrincipiaTime(self, *args):
def ZopeTime(self, *args):
"""Utility function to return current date/time"""
return apply(DateTime, args)
ZopeTime = PrincipiaTime
return DateTime(*args)
def DELETE(self, REQUEST, RESPONSE):
"""Delete a resource object."""
......
......@@ -839,20 +839,18 @@ class IApplication(IFolder, IRoot):
p_ = Attribute(""" """)
misc_ = Attribute("Misc.")
def PrincipiaRedirect(destination, URL1):
def Redirect(destination, URL1):
"""Utility function to allow user-controlled redirects"""
Redirect = ZopeRedirect = PrincipiaRedirect
ZopeRedirect = Redirect
def __bobo_traverse__(REQUEST, name=None):
"""Bobo traverse.
"""
def PrincipiaTime(*args):
def ZopeTime(*args):
"""Utility function to return current date/time"""
ZopeTime = PrincipiaTime
def absolute_url(relative=0):
"""The absolute URL of the root object is BASE1 or "/".
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment