changeset 520:a21974d68624

action.SlideShow: added a simple release check, because this plugin requires 1.8
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 11 Apr 2010 16:11:39 +0200
parents f0e8c7be3b71
children 64d08878782b
files data/plugin/action/SlideShow.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/SlideShow.py	Sun Apr 11 15:32:08 2010 +0200
+++ b/data/plugin/action/SlideShow.py	Sun Apr 11 16:11:39 2010 +0200
@@ -37,9 +37,11 @@
 
 from MoinMoin import wikiutil, i18n, error
 from MoinMoin.Page import Page
+from MoinMoin.version import release
 
 Dependencies = ['language']
 
+actname = __name__.split('.')[-1]
 
 class Error(error.Error):
     """ Raised for errors in this module """
@@ -468,6 +470,10 @@
 
 
 def execute(pagename, request):
+    if not release.startswith('1.8'):
+        msg = 'This local extension action "%(action_name)s" requires moin 1.8.' % {"action_name": actname}
+        request.theme.add_msg(msg, "warning")
+        return Page(request, pagename).send_page()
     """ Glue to current plugin system """
     SlideshowAction(request, pagename, template).execute()