annotate MoinMoin/action/anywikidraw.py @ 6133:a6283e189869 tip

fixup: remove nonexisting passlib.utils._blowfish this was removed by the passlib 1.7.1 upgrade.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 01 Jun 2017 18:10:19 +0200
parents 7e7e1cbb9d3f
children
rev   line source
5105
3feeab009683 anywikidraw/twikidraw action: fix src encoding decl
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5103
diff changeset
1 # -*- coding: iso-8859-1 -*-
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
2 """
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
3 MoinMoin - anywikidraw
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
4
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
5 This action is used to call anywikidraw (http://sourceforge.net/projects/anywikidraw/)
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
6
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
7 @copyright: 2001 by Ken Sugino (sugino@mediaone.net),
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
8 2001-2004 by Juergen Hermann <jh@web.de>,
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
9 2005 MoinMoin:AlexanderSchremmer,
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
10 2005 DiegoOngaro at ETSZONE (diego@etszone.com),
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
11 2007-2008 MoinMoin:ThomasWaldmann,
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
12 2005-2009 MoinMoin:ReimarBauer
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
13 @license: GNU GPL, see COPYING for details.
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
14 """
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
15 import os, re
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
16
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
17 from MoinMoin import log
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
18 logging = log.getLogger(__name__)
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
19
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
20 from MoinMoin import config, wikiutil
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
21 from MoinMoin.action import AttachFile, do_show
5103
6c620a7e2def anywikidraw/twikidraw action: reduce code duplication, cosmetic changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5102
diff changeset
22 from MoinMoin.action.AttachFile import _write_stream
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
23
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
24 action_name = __name__.split('.')[-1]
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
25
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
26
5106
fecbfc7f341d twikidraw/anywikidraw: reduce code duplication, make code more similar
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5105
diff changeset
27 from MoinMoin.action.twikidraw import gedit_drawing
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
28
5103
6c620a7e2def anywikidraw/twikidraw action: reduce code duplication, cosmetic changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5102
diff changeset
29
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
30 def attachment_drawing(self, url, text, **kw):
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
31 # This is called for displaying a clickable drawing image by text_html formatter.
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
32 # XXX text arg is unused!
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
33 _ = self.request.getText
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
34 pagename, drawing = AttachFile.absoluteName(url, self.page.page_name)
5102
9ae242080889 drawings/attachments: made editing support more generic (details see below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5100
diff changeset
35 containername = wikiutil.taintfilename(drawing)
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
36
5102
9ae242080889 drawings/attachments: made editing support more generic (details see below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5100
diff changeset
37 drawing_url = AttachFile.getAttachUrl(pagename, containername, self.request, do='modify')
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
38 ci = AttachFile.ContainerItem(self.request, pagename, containername)
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
39 if not ci.exists():
5102
9ae242080889 drawings/attachments: made editing support more generic (details see below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5100
diff changeset
40 title = _('Create new drawing "%(filename)s (opens in new window)"') % {'filename': self.text(containername)}
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
41 img = self.icon('attachimg') # TODO: we need a new "drawimg" in similar grey style and size
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
42 css = 'nonexistent'
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
43 return self.url(1, drawing_url, css=css, title=title) + img + self.url(0)
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
44
5102
9ae242080889 drawings/attachments: made editing support more generic (details see below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5100
diff changeset
45 title = _('Edit drawing %(filename)s (opens in new window)') % {'filename': self.text(containername)}
5086
6910e50f3c6b drawings: always use the same member file names within .tdraw / .adraw
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5082
diff changeset
46 kw['src'] = src = ci.member_url('drawing.png')
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
47 kw['css'] = 'drawing'
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
48
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
49 try:
5086
6910e50f3c6b drawings: always use the same member file names within .tdraw / .adraw
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5082
diff changeset
50 mapfile = ci.get('drawing.map')
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
51 map = mapfile.read()
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
52 mapfile.close()
5100
3920769287c4 twikidraw/anywikidraw action: fix nonascii drawing name handling
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5098
diff changeset
53 map = map.decode(config.charset)
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
54 except (KeyError, IOError, OSError):
5100
3920769287c4 twikidraw/anywikidraw action: fix nonascii drawing name handling
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5098
diff changeset
55 map = u''
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
56 if map:
5087
d094bbd6c7c4 action anywikidraw: comment cleanup
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 5086
diff changeset
57 # ToDo mapid must become uniq
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
58 # we have a image map. inline it and add a map ref to the img tag
5245
55de22afaff3 drawings: A unique ID for image maps is needed if drawings with the same name are included from different pages (bug fix for 1.9ImageMapsInDrawingsDontWork).
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 5234
diff changeset
59 # we have also to set a unique ID
55de22afaff3 drawings: A unique ID for image maps is needed if drawings with the same name are included from different pages (bug fix for 1.9ImageMapsInDrawingsDontWork).
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 5234
diff changeset
60 mapid = u'ImageMapOf%s%s' % (self.request.uid_generator(pagename), drawing)
55de22afaff3 drawings: A unique ID for image maps is needed if drawings with the same name are included from different pages (bug fix for 1.9ImageMapsInDrawingsDontWork).
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 5234
diff changeset
61
5100
3920769287c4 twikidraw/anywikidraw action: fix nonascii drawing name handling
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5098
diff changeset
62 map = map.replace(u'id="%s.svg"' % drawing, '')
3920769287c4 twikidraw/anywikidraw action: fix nonascii drawing name handling
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5098
diff changeset
63 map = map.replace(u'name="%s.svg"' % drawing, u'name="%s"' % mapid)
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
64 # unxml, because 4.01 concrete will not validate />
5100
3920769287c4 twikidraw/anywikidraw action: fix nonascii drawing name handling
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5098
diff changeset
65 map = map.replace(u'/>', u'>')
5102
9ae242080889 drawings/attachments: made editing support more generic (details see below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5100
diff changeset
66 title = _('Clickable drawing: %(filename)s') % {'filename': self.text(containername)}
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
67 if 'title' not in kw:
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
68 kw['title'] = title
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
69 if 'alt' not in kw:
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
70 kw['alt'] = kw['title']
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
71 kw['usemap'] = '#'+mapid
5080
67114f9e3d81 action.anywikidraw: links the image to the drawing action. Any image mapping overwrites the default link for the region which is covered by the mapping. The white around the mapping url links to the action.
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 5079
diff changeset
72 return self.url(1, drawing_url) + map + self.image(**kw) + self.url(0)
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
73 else:
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
74 if 'title' not in kw:
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
75 kw['title'] = title
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
76 if 'alt' not in kw:
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
77 kw['alt'] = kw['title']
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
78 return self.url(1, drawing_url) + self.image(**kw) + self.url(0)
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
79
5103
6c620a7e2def anywikidraw/twikidraw action: reduce code duplication, cosmetic changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5102
diff changeset
80
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
81 class AnyWikiDraw(object):
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
82 """ anywikidraw action """
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
83 def __init__(self, request, pagename, target):
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
84 self.request = request
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
85 self.pagename = pagename
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
86 self.target = target
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
87
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
88 def save(self):
5107
26379ee2aa74 anywikidraw/twikidraw action: more cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5106
diff changeset
89 request = self.request
26379ee2aa74 anywikidraw/twikidraw action: more cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5106
diff changeset
90 _ = request.getText
5524
069f75c3d59c merged moin/1.8 + changes needed for ticket support of 1.9 drawings code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5268
diff changeset
91
069f75c3d59c merged moin/1.8 + changes needed for ticket support of 1.9 drawings code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5268
diff changeset
92 if not wikiutil.checkTicket(request, request.args.get('ticket', '')):
069f75c3d59c merged moin/1.8 + changes needed for ticket support of 1.9 drawings code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5268
diff changeset
93 return _('Please use the interactive user interface to use action %(actionname)s!') % {'actionname': 'anywikidraw.save' }
069f75c3d59c merged moin/1.8 + changes needed for ticket support of 1.9 drawings code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5268
diff changeset
94
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
95 pagename = self.pagename
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
96 target = self.target
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
97 if not request.user.may.write(pagename):
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
98 return _('You are not allowed to save a drawing on this page.')
5107
26379ee2aa74 anywikidraw/twikidraw action: more cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5106
diff changeset
99 if not target:
5268
02fc82fc062d twikidraw/anywikidraw action: improve error msgs
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5245
diff changeset
100 return _("Empty target name given.")
5107
26379ee2aa74 anywikidraw/twikidraw action: more cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5106
diff changeset
101
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
102 file_upload = request.files.get('filepath')
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
103 if not file_upload:
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
104 # This might happen when trying to upload file names
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
105 # with non-ascii characters on Safari.
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
106 return _("No file content. Delete non ASCII characters from the file name and try again.")
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
107
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
108 filename = request.form['filename']
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
109 basepath, basename = os.path.split(filename)
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
110 basename, ext = os.path.splitext(basename)
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
111
5102
9ae242080889 drawings/attachments: made editing support more generic (details see below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5100
diff changeset
112 ci = AttachFile.ContainerItem(request, pagename, target)
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
113 filecontent = file_upload.stream
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
114 content_length = None
5088
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
115 if ext == '.svg': # AnyWikiDraw POSTs this first
5102
9ae242080889 drawings/attachments: made editing support more generic (details see below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5100
diff changeset
116 AttachFile._addLogEntry(request, 'ATTDRW', pagename, target)
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
117 ci.truncate()
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
118 filecontent = filecontent.read() # read file completely into memory
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
119 filecontent = filecontent.replace("\r", "")
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
120 elif ext == '.map':
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
121 # touch attachment directory to invalidate cache if new map is saved
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
122 attach_dir = AttachFile.getAttachDir(request, pagename)
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
123 os.utime(attach_dir, None)
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
124 filecontent = filecontent.read() # read file completely into memory
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
125 filecontent = filecontent.strip()
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
126 else:
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
127 #content_length = file_upload.content_length
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
128 # XXX gives -1 for wsgiref :( If this is fixed, we could use the file obj,
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
129 # without reading it into memory completely:
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
130 filecontent = filecontent.read()
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
131
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
132 if filecontent:
5086
6910e50f3c6b drawings: always use the same member file names within .tdraw / .adraw
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5082
diff changeset
133 ci.put('drawing' + ext, filecontent, content_length)
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
134
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
135 def render(self):
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
136 request = self.request
5107
26379ee2aa74 anywikidraw/twikidraw action: more cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5106
diff changeset
137 _ = request.getText
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
138 pagename = self.pagename
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
139 target = self.target
5107
26379ee2aa74 anywikidraw/twikidraw action: more cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5106
diff changeset
140 if not request.user.may.read(pagename):
26379ee2aa74 anywikidraw/twikidraw action: more cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5106
diff changeset
141 return _('You are not allowed to view attachments of this page.')
26379ee2aa74 anywikidraw/twikidraw action: more cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5106
diff changeset
142 if not target:
5268
02fc82fc062d twikidraw/anywikidraw action: improve error msgs
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5245
diff changeset
143 return _("Empty target name given.")
5107
26379ee2aa74 anywikidraw/twikidraw action: more cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5106
diff changeset
144
5102
9ae242080889 drawings/attachments: made editing support more generic (details see below)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5100
diff changeset
145 ci = AttachFile.ContainerItem(request, pagename, target)
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
146 if ci.exists():
5088
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
147 drawurl = ci.member_url('drawing.svg')
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
148 else:
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
149 drawurl = ''
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
150 pageurl = request.href(pagename)
5524
069f75c3d59c merged moin/1.8 + changes needed for ticket support of 1.9 drawings code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5268
diff changeset
151 saveurl = request.href(pagename, action=action_name, do='save', target=target,
069f75c3d59c merged moin/1.8 + changes needed for ticket support of 1.9 drawings code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5268
diff changeset
152 ticket=wikiutil.createTicket(request))
5088
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
153 helpurl = request.href("HelpOnActions/AttachFile")
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
154
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
155 html = """
5088
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
156 <p>
5233
ce4b90e6f512 action anywikidraw: adapted to anywikidraw 0.14 for moin
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 5159
diff changeset
157 <applet code="org.anywikidraw.moinmoin.MoinMoinDrawingApplet.class" codebase="."
ce4b90e6f512 action anywikidraw: adapted to anywikidraw 0.14 for moin
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 5159
diff changeset
158 archive="%(htdocs)s/applets/anywikidraw/lib/AnyWikiDrawForMoinMoin.jar" width="800" height="620">
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
159
5088
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
160 <!-- The following parameters are used to tell AnyWikiDraw how to communicate with MoinMoin. -->
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
161 <param name="DrawingName" value="%(basename)s.svg">
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
162 <param name="DrawingURL" value="%(drawurl)s">
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
163 <param name="PageURL" value="%(pageurl)s">
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
164 <param name="UploadURL" value="%(saveurl)s">
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
165
5088
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
166 <!-- The following parameters are used to configure the drawing applet -->
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
167 <param name="Locale" value="en">
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
168
5088
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
169 <!-- The following parameters are used to configure Sun's Java Plug-In -->
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
170 <param name="codebase_lookup" value="false">
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
171 <param name="classloader_cache" value="false">
5159
32f7a1724d14 remove anywikidraw .pack.gz file, makes more trouble than it's worth
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5155
diff changeset
172 <!-- The following makes trouble with FF3 on Ubuntu 9.04 as client and
32f7a1724d14 remove anywikidraw .pack.gz file, makes more trouble than it's worth
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5155
diff changeset
173 Apache2 / mod_wsgi on Debian Lenny as server, it seems to confuse
32f7a1724d14 remove anywikidraw .pack.gz file, makes more trouble than it's worth
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5155
diff changeset
174 .gz files with gzip content-encoding and fails miserably somehow:
32f7a1724d14 remove anywikidraw .pack.gz file, makes more trouble than it's worth
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5155
diff changeset
175 param name="java_arguments" value="-Djnlp.packEnabled=true" -->
5088
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
176 <param name="boxborder" value="false">
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
177 <param name="centerimage" value="true">
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
178 <strong>NOTE:</strong> You need a Java enabled browser to edit the drawing.
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
179 </applet>
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
180 </p>
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
181 """ % dict(
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
182 htdocs=request.cfg.url_prefix_static,
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
183 basename=wikiutil.escape(target, 1),
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
184 drawurl=wikiutil.escape(drawurl, 1),
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
185 pageurl=wikiutil.escape(pageurl, 1),
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
186 saveurl=wikiutil.escape(saveurl, 1),
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
187 )
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
188
a2a51a2ebd6e twikidraw/anywikidraw action: make code more similar, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5087
diff changeset
189 title = '%s %s:%s' % (_('Edit drawing'), pagename, target)
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
190 request.theme.send_title(title, page=request.page, pagename=pagename)
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
191 request.write(request.formatter.startContent("content"))
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
192 request.write(request.formatter.rawHTML(html))
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
193 request.write(request.formatter.endContent())
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
194 request.theme.send_footer(pagename)
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
195 request.theme.send_closing_html()
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
196
5103
6c620a7e2def anywikidraw/twikidraw action: reduce code duplication, cosmetic changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5102
diff changeset
197
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
198 def execute(pagename, request):
5107
26379ee2aa74 anywikidraw/twikidraw action: more cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5106
diff changeset
199 target = request.values.get('target')
5910
7e7e1cbb9d3f security: fix remote code execution vulnerability in twikidraw/anywikidraw actions
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5679
diff changeset
200 target = wikiutil.taintfilename(target)
7e7e1cbb9d3f security: fix remote code execution vulnerability in twikidraw/anywikidraw actions
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5679
diff changeset
201
5107
26379ee2aa74 anywikidraw/twikidraw action: more cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5106
diff changeset
202 awd = AnyWikiDraw(request, pagename, target)
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
203
5107
26379ee2aa74 anywikidraw/twikidraw action: more cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5106
diff changeset
204 do = request.values.get('do')
26379ee2aa74 anywikidraw/twikidraw action: more cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5106
diff changeset
205 if do == 'save':
26379ee2aa74 anywikidraw/twikidraw action: more cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5106
diff changeset
206 msg = awd.save()
26379ee2aa74 anywikidraw/twikidraw action: more cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5106
diff changeset
207 else:
26379ee2aa74 anywikidraw/twikidraw action: more cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5106
diff changeset
208 msg = awd.render()
26379ee2aa74 anywikidraw/twikidraw action: more cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5106
diff changeset
209 if msg:
5679
e50b087c4572 merge moin/1.7
Eugene Syromyatnikov <evgsyr@gmail.com>
parents: 5524
diff changeset
210 request.theme.add_msg(wikiutil.escape(msg), 'error')
5107
26379ee2aa74 anywikidraw/twikidraw action: more cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5106
diff changeset
211 do_show(pagename, request)
5069
5ef5bf8910b9 action.anywikidraw: initial vesion for a drawing action based on the AnyWikiDraw java applet
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
212