diff MoinMoin/items/__init__.py @ 257:eea3a94a4061

refactored calling convention of converters, add rev=n qs argument for Iris (fixes #21) Now converters get fed either with the revision (for binary items) or the markup lines (for text items). Converters getting revisions (rev=... in qs) now create links to specific revnos. Cleaned up some code in the link converter and enabled it to create links to specific revisions.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 25 Jun 2011 16:07:50 +0200
parents 02888ad76719
children ebdfe9448e01 748054b11929 72899d48db41
line wrap: on
line diff
--- a/MoinMoin/items/__init__.py	Sat Jun 25 12:18:05 2011 +0200
+++ b/MoinMoin/items/__init__.py	Sat Jun 25 16:07:50 2011 +0200
@@ -219,7 +219,7 @@
         return ''
 
     def feed_input_conv(self):
-        return self.name
+        return self.rev
 
     def internal_representation(self, converters=['smiley']):
         """
@@ -859,8 +859,9 @@
 
 
 class ApplicationXTar(TarMixin, Application):
-    def feed_input_conv(self):
-        return self.rev
+    """
+    Tar items
+    """
 
 item_registry.register(ApplicationXTar._factory, Type('application/x-tar'))
 item_registry.register(ApplicationXTar._factory, Type('application/x-gtar'))
@@ -894,8 +895,9 @@
 
 
 class ApplicationZip(ZipMixin, Application):
-    def feed_input_conv(self):
-        return self.rev
+    """
+    Zip items
+    """
 
 item_registry.register(ApplicationZip._factory, Type('application/zip'))