changeset 4186:126559845d4b

Use Werkzeug-property names instead of old MoinMoin attribute names
author Florian Krupicka <florian.krupicka@googlemail.com>
date Sat, 21 Jun 2008 20:25:35 +0200
parents 68bcf39ae1d3
children c659fd8d792d
files MoinMoin/action/newaccount.py MoinMoin/action/newpage.py MoinMoin/action/recoverpass.py MoinMoin/action/revert.py MoinMoin/session.py MoinMoin/theme/__init__.py MoinMoin/userprefs/changepass.py MoinMoin/userprefs/notification.py MoinMoin/userprefs/oid.py MoinMoin/userprefs/prefs.py MoinMoin/userprefs/suid.py MoinMoin/web/utils.py
diffstat 12 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/newaccount.py	Sat Jun 21 20:02:17 2008 +0200
+++ b/MoinMoin/action/newaccount.py	Sat Jun 21 20:25:35 2008 +0200
@@ -18,7 +18,7 @@
     _ = request.getText
     form = request.form
 
-    if request.request_method != 'POST':
+    if request.method != 'POST':
         return
 
     if not TextCha(request).check_answer_from_form():
--- a/MoinMoin/action/newpage.py	Sat Jun 21 20:02:17 2008 +0200
+++ b/MoinMoin/action/newpage.py	Sat Jun 21 20:25:35 2008 +0200
@@ -97,7 +97,7 @@
 
 def execute(pagename, request):
     """ Temporary glue code for current moin action system """
-    if request.request_method != 'POST':
+    if request.method != 'POST':
         return False, u''
 
     return NewPage(request, pagename).render()
--- a/MoinMoin/action/recoverpass.py	Sat Jun 21 20:02:17 2008 +0200
+++ b/MoinMoin/action/recoverpass.py	Sat Jun 21 20:25:35 2008 +0200
@@ -193,7 +193,7 @@
         request.theme.send_footer(pagename)
         request.theme.send_closing_html()
     elif submitted: # user pressed create button
-        if request.request_method != 'POST':
+        if request.method != 'POST':
             return
         msg = _do_recover(request)
         request.theme.add_msg(msg, "dialog")
--- a/MoinMoin/action/revert.py	Sat Jun 21 20:02:17 2008 +0200
+++ b/MoinMoin/action/revert.py	Sat Jun 21 20:25:35 2008 +0200
@@ -54,7 +54,7 @@
         comment = form.get('comment', [u''])[0]
         comment = wikiutil.clean_input(comment)
 
-        if self.request.request_method != 'POST':
+        if self.request.method != 'POST':
             return False, u''
 
         rev = self.request.rev
--- a/MoinMoin/session.py	Sat Jun 21 20:02:17 2008 +0200
+++ b/MoinMoin/session.py	Sat Jun 21 20:25:35 2008 +0200
@@ -341,8 +341,8 @@
 
     def get(self, request):
         session_name = None
-        if request.cookie and self.cookie_name in request.cookie:
-            session_name = request.cookie[self.cookie_name]
+        if request.cookies and self.cookie_name in request.cookies:
+            session_name = request.cookies[self.cookie_name]
             if hasattr(session_name, 'value'):
                 session_name = session_name.value
             session_name = ''.join([c for c in session_name
--- a/MoinMoin/theme/__init__.py	Sat Jun 21 20:02:17 2008 +0200
+++ b/MoinMoin/theme/__init__.py	Sat Jun 21 20:25:35 2008 +0200
@@ -1571,7 +1571,7 @@
         # if it is an action or edit/search, send query headers (noindex,nofollow):
         if request.query_string:
             user_head.append(request.cfg.html_head_queries)
-        elif request.request_method == 'POST':
+        elif request.method == 'POST':
             user_head.append(request.cfg.html_head_posts)
         # we don't want to have BadContent stuff indexed:
         elif pagename in ['BadContent', 'LocalBadContent', ]:
--- a/MoinMoin/userprefs/changepass.py	Sat Jun 21 20:02:17 2008 +0200
+++ b/MoinMoin/userprefs/changepass.py	Sat Jun 21 20:25:35 2008 +0200
@@ -40,7 +40,7 @@
         if form.has_key('cancel'):
             return
 
-        if request.request_method != 'POST':
+        if request.method != 'POST':
             return
 
         password = form.get('password1', [''])[0]
--- a/MoinMoin/userprefs/notification.py	Sat Jun 21 20:02:17 2008 +0200
+++ b/MoinMoin/userprefs/notification.py	Sat Jun 21 20:25:35 2008 +0200
@@ -46,7 +46,7 @@
         _ = self._
         form = self.request.form
 
-        if self.request.request_method != 'POST':
+        if self.request.method != 'POST':
             return
         theuser = self.request.user
         if not theuser:
--- a/MoinMoin/userprefs/oid.py	Sat Jun 21 20:02:17 2008 +0200
+++ b/MoinMoin/userprefs/oid.py	Sat Jun 21 20:25:35 2008 +0200
@@ -138,7 +138,7 @@
         if form.has_key('cancel'):
             return
 
-        if self.request.request_method != 'POST':
+        if self.request.method != 'POST':
             return
 
         if form.has_key('remove'):
--- a/MoinMoin/userprefs/prefs.py	Sat Jun 21 20:02:17 2008 +0200
+++ b/MoinMoin/userprefs/prefs.py	Sat Jun 21 20:25:35 2008 +0200
@@ -62,7 +62,7 @@
         form = self.request.form
         request = self.request
 
-        if request.request_method != 'POST':
+        if request.method != 'POST':
             return
 
         if not 'name' in request.user.auth_attribs:
--- a/MoinMoin/userprefs/suid.py	Sat Jun 21 20:02:17 2008 +0200
+++ b/MoinMoin/userprefs/suid.py	Sat Jun 21 20:25:35 2008 +0200
@@ -39,7 +39,7 @@
             return
 
         if (wikiutil.checkTicket(self.request, self.request.form['ticket'][0])
-            and self.request.request_method == 'POST'):
+            and self.request.method == 'POST'):
             uid = form.get('selected_user', [''])[0]
             if not uid:
                 return 'error', _("No user selected")
--- a/MoinMoin/web/utils.py	Sat Jun 21 20:02:17 2008 +0200
+++ b/MoinMoin/web/utils.py	Sat Jun 21 20:25:35 2008 +0200
@@ -156,7 +156,7 @@
 def handle_auth(user_obj, request, attended=False, username=None,
                 password=None, openid_identifier=None, login=None,
                 logout=None, stage=None):
-    extra = { 'cookie': request.cookie }
+    extra = { 'cookie': request.cookies }
     if login:
         extra['attended'] = attended
         extra['username'] = username