[Zope3-checkins] CVS: Zope3/src/zope/app/browser/content - fssync.py:1.21

Steve Alexander steve@cat-box.net
Fri, 13 Jun 2003 13:41:43 -0400


Update of /cvs-repository/Zope3/src/zope/app/browser/content
In directory cvs.zope.org:/tmp/cvs-serv28622/src/zope/app/browser/content

Modified Files:
	fssync.py 
Log Message:
Removed the @@object_name view, as used in some page templates, and
the ObjectName view and adapter also.
Extended IPhysicallyLocatable with a getName method.
Renamed the convenience function objectName to getName.

If you have page templates that use @@object_name, then you can replace it
with zope:name.



=== Zope3/src/zope/app/browser/content/fssync.py 1.20 => 1.21 ===
--- Zope3/src/zope/app/browser/content/fssync.py:1.20	Tue Jun 10 18:01:33 2003
+++ Zope3/src/zope/app/browser/content/fssync.py	Fri Jun 13 13:41:12 2003
@@ -25,7 +25,7 @@
 from transaction import get_transaction
 
 from zope.publisher.browser import BrowserView
-from zope.app.traversing import objectName, getParent, getRoot
+from zope.app.traversing import getName, getParent, getRoot
 from zope.app.interfaces.exceptions import UserError
 from zope.fssync.snarf import Snarfer, Unsnarfer
 from zope.app.fssync.syncer import toFS
@@ -52,7 +52,7 @@
         dirname = tempfile.mktemp()
         try:
             os.mkdir(dirname)
-            toFS(self.context, objectName(self.context) or "root", dirname)
+            toFS(self.context, getName(self.context) or "root", dirname)
             return snarf_dir(self.request.response, dirname)
         finally:
             if os.path.isdir(dirname):
@@ -148,7 +148,7 @@
 
     def set_commit_arguments(self):
         # Compute self.{name, container, fspath} for commit()
-        self.name = objectName(self.context)
+        self.name = getName(self.context)
         self.container = getParent(self.context)
         if self.container is None and self.name == "":
             # Hack to get loading the root to work
@@ -216,7 +216,7 @@
     def write_to_filesystem(self):
         shutil.rmtree(self.tempdir) # Start with clean slate
         os.mkdir(self.tempdir)
-        toFS(self.context, objectName(self.context) or "root", self.tempdir)
+        toFS(self.context, getName(self.context) or "root", self.tempdir)
 
     def send_archive(self):
         return snarf_dir(self.request.response, self.tempdir)