changeset 177:a399665b4cb9

text_x_arnica, refresh: added image extension to key
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Wed, 16 Jul 2008 06:57:25 +0200
parents 27039f0d187c
children d29abc5e4b4f
files data/plugin/action/refresh.py data/plugin/parser/text_x_arnica.py
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/refresh.py	Wed Jul 16 06:51:25 2008 +0200
+++ b/data/plugin/action/refresh.py	Wed Jul 16 06:57:25 2008 +0200
@@ -8,7 +8,7 @@
     @license: GNU GPL, see COPYING for details.
 """
 import os
-from MoinMoin import config
+from MoinMoin import config, wikiutil
 from MoinMoin.action import cache
 from MoinMoin.Page import Page
 
@@ -32,7 +32,7 @@
     files = [fn.decode(config.charset) for fn in os.listdir(path)  if fn.endswith('data')]
     for file_name in files:
         key, ext = os.path.splitext(file_name)
-        if key.startswith('T') or key.startswith('W'):
+        if key.startswith('T') or key.startswith('W') and wikiutil.isPicture(key):
             cache.remove(request, key)
 
     request.page.send_page()
--- a/data/plugin/parser/text_x_arnica.py	Wed Jul 16 06:51:25 2008 +0200
+++ b/data/plugin/parser/text_x_arnica.py	Wed Jul 16 06:57:25 2008 +0200
@@ -395,8 +395,8 @@
             self.high_resolution_image.append(attfile)
             fname, ext = os.path.splitext(attfile)
             key = cache.key(self.request, itemname=self.pagename, attachname=attfile) 
-            webnail = 'W' + key
-            thumbfile = 'T' + key
+            webnail = 'W' + key + ext
+            thumbfile = 'T' + key + ext
             if ext in ('.gif', '.png'):
                 self.imgtype.append('PNG')
             else: