changeset 38:e6bd98eea9f5

arnica_slides: some comments added
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sat, 24 May 2008 12:18:29 +0200
parents ad1d433589e4
children a30075ec4b43
files data/plugin/action/arnica_slides.py
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/arnica_slides.py	Sat May 24 12:08:08 2008 +0200
+++ b/data/plugin/action/arnica_slides.py	Sat May 24 12:18:29 2008 +0200
@@ -350,7 +350,8 @@
         attachment_path = AttachFile.getAttachDir(request, pagename)
         command = request.form.get('do', ['none'])[0]
         target = request.form.get('target', [''])[0]
-
+ 
+        # View Slides
         if command == 'VS':
             web = {}
             images = request.form.get('images', [''])[0]
@@ -392,6 +393,7 @@
             request.write(request.formatter.endContent())
             request.write(request.theme.send_footer(pagename))
 
+        # view sends a cached attachment (thumbnail or webnail) to the browser
         elif command == 'view':
             if not request.user.may.read(pagename):
                 msg = _('You are not allowed to view attachments of this page.')
@@ -426,9 +428,11 @@
                 # send data
                 request.send_file(open(fpath, 'rb'))
 
+        # not used ???
         elif command == 'PS':
             pass
 
+        # goes back to the arnica page not needed if no msg should be sent
         elif command == 'BS':
             pass
 
@@ -452,11 +456,13 @@
             cache_thumb = caching.CacheEntry(request, page, thumbfile, scope='item', use_pickle=True)
 
             infile = os.path.join(attachment_path, target)
-            # removes (moves to bak)
+
+            # removes attachment (moves to bak)
             if command == 'RM':
                 if os.path.exists(infile + '.bak'):
                     os.unlink("%(file)s.bak" % {"file": infile})
                 filesys.rename(infile, "%(file)s.bak" % {"file": infile})
+                # removes cache files
                 cache_web.remove()
                 cache_thumb.remove()
 
@@ -492,4 +498,3 @@
         return
 
     return arnica_slides(request, pagename).render()
-