changeset 315:fed6024028b4

link converter: remove url_root param, not needed any more
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 05 Aug 2011 13:25:12 +0200
parents f39b2747ac16
children 4ee796d759bf
files MoinMoin/converter/_tests/test_link.py MoinMoin/converter/link.py MoinMoin/items/__init__.py
diffstat 3 files changed, 8 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/converter/_tests/test_link.py	Fri Aug 05 13:20:57 2011 +0200
+++ b/MoinMoin/converter/_tests/test_link.py	Fri Aug 05 13:25:12 2011 +0200
@@ -17,8 +17,7 @@
 
 class TestConverterExternOutput(object):
     def setup_class(self):
-        url_root = Iri('./')
-        self.conv = ConverterExternOutput(url_root=url_root)
+        self.conv = ConverterExternOutput()
 
     def test_wiki(self):
         assert 'MoinMoin' in app.cfg.interwiki_map
@@ -83,8 +82,7 @@
 
 class TestConverterRefs(object):
     def setup_class(self):
-        root = url_root=Iri('./')
-        self.converter = ConverterItemRefs(url_root=root)
+        self.converter = ConverterItemRefs()
 
     def testItems(self):
         tree_xml = u"""
--- a/MoinMoin/converter/link.py	Fri Aug 05 13:20:57 2011 +0200
+++ b/MoinMoin/converter/link.py	Fri Aug 05 13:25:12 2011 +0200
@@ -36,9 +36,6 @@
     def handle_wikilocal_transclusions(self, elem, link, page_name):
         pass
 
-    def __init__(self, url_root=None):
-        self.url_root = url_root
-
     def __call__(self, *args, **kw):
         """
         Calls the self.traverse_tree method
@@ -102,9 +99,9 @@
 
 class ConverterExternOutput(ConverterBase):
     @classmethod
-    def _factory(cls, input, output, links=None, url_root=None, **kw):
+    def _factory(cls, input, output, links=None, **kw):
         if links == 'extern':
-            return cls(url_root=url_root)
+            return cls()
 
     def _get_do_rev(self, query):
         """
@@ -183,9 +180,9 @@
     determine all links and transclusions to other wiki items in this document
     """
     @classmethod
-    def _factory(cls, input, output, items=None, url_root=None, **kw):
+    def _factory(cls, input, output, items=None, **kw):
         if items == 'refs':
-            return cls(url_root=url_root)
+            return cls()
 
     def __init__(self, **kw):
         super(ConverterItemRefs, self).__init__(**kw)
--- a/MoinMoin/items/__init__.py	Fri Aug 05 13:20:57 2011 +0200
+++ b/MoinMoin/items/__init__.py	Fri Aug 05 13:25:12 2011 +0200
@@ -264,8 +264,7 @@
         from MoinMoin.converter import default_registry as reg
         include_conv = reg.get(type_moin_document, type_moin_document, includes='expandall')
         macro_conv = reg.get(type_moin_document, type_moin_document, macros='expandall')
-        link_conv = reg.get(type_moin_document, type_moin_document, links='extern',
-                url_root=Iri(request.url_root))
+        link_conv = reg.get(type_moin_document, type_moin_document, links='extern')
         flaskg.clock.start('conv_include')
         doc = include_conv(doc)
         flaskg.clock.stop('conv_include')
@@ -1204,8 +1203,7 @@
         from MoinMoin.converter import default_registry as reg
 
         input_conv = reg.get(Type(self.contenttype), type_moin_document)
-        item_conv = reg.get(type_moin_document, type_moin_document,
-                items='refs', url_root=Iri(request.url_root))
+        item_conv = reg.get(type_moin_document, type_moin_document, items='refs')
 
         i = Iri(scheme='wiki', authority='', path='/' + self.name)