changeset 2861:e1ce3040fcd6

gedit formatter: remove special casing for ImageLink
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 22 Sep 2007 22:50:10 +0200
parents 97c5fba1c6ae
children 8c1d40768df7
files MoinMoin/formatter/text_gedit.py
diffstat 1 files changed, 1 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/formatter/text_gedit.py	Thu Sep 20 20:57:29 2007 +0200
+++ b/MoinMoin/formatter/text_gedit.py	Sat Sep 22 22:50:10 2007 +0200
@@ -98,38 +98,7 @@
     # Dynamic stuff / Plugins ############################################
 
     def macro(self, macro_obj, name, args, markup=None):
-        #use ImageLink for resized images
-        if name == "ImageLink" and args is not None:
-
-            from MoinMoin.macro import ImageLink
-            pagename = self.page.page_name
-
-            kwAllowed = ['width', 'height', 'alt']
-            pp, pp_count, kw, kw_count = ImageLink.explore_args(args, kwAllowed)
-
-            kw['src'] = None
-            url = None
-
-            if pp_count >= 1:
-                url = pp[0]
-
-            if pp_count == 2:
-                kw['target'] = pp[1]
-
-            if ImageLink._is_URL(url):
-                kw['src'] = url
-                kw['title'] = url
-            else:
-                kw['title'] = "attachment:%s" % wikiutil.quoteWikinameURL(url)
-
-            if kw['src'] is None:
-                if '/' in url:
-                    pagename, target = AttachFile.absoluteName(url, pagename)
-                    url = url.split('/')[-1]
-                kw['src'] = AttachFile.getAttachUrl(pagename, url, self.request, addts=1)
-            return self.image(**kw)
-
-        elif markup is not None:
+        if markup is not None:
             result = markup
         elif args is not None:
             result = "<<%s(%s)>>" % (name, args)