changeset 3523:74f42592c7a0

action bookmark, subscribe, unsubscribe, userprefs: moved actname under the if ...
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sat, 26 Apr 2008 15:43:15 +0200
parents 5ca3fd52a265
children 7bf5046e892e ee0644a26e30
files MoinMoin/action/bookmark.py MoinMoin/action/subscribe.py MoinMoin/action/unsubscribe.py MoinMoin/action/userprefs.py
diffstat 4 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/bookmark.py	Sat Apr 26 11:39:39 2008 +0200
+++ b/MoinMoin/action/bookmark.py	Sat Apr 26 15:43:15 2008 +0200
@@ -14,8 +14,8 @@
 def execute(pagename, request):
     """ set bookmarks (in time) for RecentChanges or delete them """
     _ = request.getText
-    actname = __name__.split('.')[-1]
     if not request.user.valid:
+        actname = __name__.split('.')[-1]
         request.theme.add_msg(_("You must login to use this action: %(action)s.") % {"action": actname}, "error")
         return Page(request, pagename).send_page()
 
--- a/MoinMoin/action/subscribe.py	Sat Apr 26 11:39:39 2008 +0200
+++ b/MoinMoin/action/subscribe.py	Sat Apr 26 15:43:15 2008 +0200
@@ -11,8 +11,8 @@
 def execute(pagename, request):
     """ Subscribe the user to pagename """
     _ = request.getText
-    actname = __name__.split('.')[-1]
     if not request.user.valid:
+        actname = __name__.split('.')[-1]
         request.theme.add_msg(_("You must login to use this action: %(action)s.") % {"action": actname}, "error")
         return Page(request, pagename).send_page()
 
--- a/MoinMoin/action/unsubscribe.py	Sat Apr 26 11:39:39 2008 +0200
+++ b/MoinMoin/action/unsubscribe.py	Sat Apr 26 15:43:15 2008 +0200
@@ -11,8 +11,8 @@
 def execute(pagename, request):
     """ Unsubscribe the user from pagename """
     _ = request.getText
-    actname = __name__.split('.')[-1]
     if not request.user.valid:
+        actname = __name__.split('.')[-1]
         request.theme.add_msg(_("You must login to use this action: %(action)s.") % {"action": actname}, "error")
         return Page(request, pagename).send_page()
 
--- a/MoinMoin/action/userprefs.py	Sat Apr 26 11:39:39 2008 +0200
+++ b/MoinMoin/action/userprefs.py	Sat Apr 26 15:43:15 2008 +0200
@@ -87,8 +87,8 @@
 
 def execute(pagename, request):
     _ = request.getText
-    actname = __name__.split('.')[-1]
     if not request.user.valid:
+        actname = __name__.split('.')[-1]
         request.theme.add_msg(_("You must login to use this action: %(action)s.") % {"action": actname}, "error")
         return Page.Page(request, pagename).send_page()