SVN: Zope/trunk/ On the application object, removed `PrincipiaTime` in favor of `ZopeTime` and `PrincipiaRedirect` in favor of `Redirect` or `ZopeRedirect`.

Hanno Schlichting <[email protected]>
Newsgroups gmane.comp.web.zope.cvs
Message-ID <20110703162235.D0E4A940C9__20405.8811454617$1309710168$gmane$org@cvs.zope.org>
Log message for revision 122097:
  On the application object, removed `PrincipiaTime` in favor of `ZopeTime` and `PrincipiaRedirect` in favor of `Redirect` or `ZopeRedirect`.
  

Changed:
  U   Zope/trunk/doc/CHANGES.rst
  U   Zope/trunk/src/OFS/Application.py
  U   Zope/trunk/src/OFS/interfaces.py

-=-
Modified: Zope/trunk/doc/CHANGES.rst
===================================================================
--- Zope/trunk/doc/CHANGES.rst	2011-07-03 16:16:05 UTC (rev 122096)
+++ Zope/trunk/doc/CHANGES.rst	2011-07-03 16:22:35 UTC (rev 122097)
@@ -44,6 +44,9 @@
 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`

Modified: Zope/trunk/src/OFS/Application.py
===================================================================
--- Zope/trunk/src/OFS/Application.py	2011-07-03 16:16:05 UTC (rev 122096)
+++ Zope/trunk/src/OFS/Application.py	2011-07-03 16:22:35 UTC (rev 122097)
@@ -102,13 +102,13 @@
     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,12 +134,10 @@
         except AttributeError:
             raise KeyError, name
 
-    def PrincipiaTime(self, *args):
+    def ZopeTime(self, *args):
         """Utility function to return current date/time"""
-        return apply(DateTime, args)
+        return DateTime(*args)
 
-    ZopeTime = PrincipiaTime
-
     def DELETE(self, REQUEST, RESPONSE):
         """Delete a resource object."""
         self.dav__init(REQUEST, RESPONSE)

Modified: Zope/trunk/src/OFS/interfaces.py
===================================================================
--- Zope/trunk/src/OFS/interfaces.py	2011-07-03 16:16:05 UTC (rev 122096)
+++ Zope/trunk/src/OFS/interfaces.py	2011-07-03 16:22:35 UTC (rev 122097)
@@ -839,20 +839,18 @@
     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 "/".
         """

_______________________________________________
Zope-Checkins maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-checkins
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.