changeset 737:87cf4c0aac44

hopefully fixes the css_url backtrace for new users when admin removed css_url form field
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 02 Jun 2006 21:01:03 +0200
parents e80ad5feaba8
children 0631cda1fbf8
files MoinMoin/multiconfig.py MoinMoin/user.py docs/CHANGES
diffstat 3 files changed, 4 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/multiconfig.py	Fri Jun 02 19:18:15 2006 +0200
+++ b/MoinMoin/multiconfig.py	Fri Jun 02 21:01:03 2006 +0200
@@ -428,15 +428,9 @@
         ('email', _('Email'), "text", "36", ''),
         ('css_url', _('User CSS URL'), "text", "40", _('(Leave it empty for disabling user CSS)')),
         ('edit_rows', _('Editor size'), "text", "3", ''),
-        ##('theme', _('Preferred theme'), [self._theme_select()])
-        ##('', _('Editor Preference'), [self._editor_default_select()])
-        ##('', _('Editor shown on UI'), [self._editor_ui_select()])
-        ##('', _('Time zone'), [self._tz_select()])
-        ##('', _('Date format'), [self._dtfmt_select()])
-        ##('', _('Preferred language'), [self._lang_select()])
     ]
     
-    user_form_defaults = { # key: default
+    user_form_defaults = { # key: default - do NOT remove keys from here!
         'name': '',
         'aliasname': '',
         'password': '',
--- a/MoinMoin/user.py	Fri Jun 02 19:18:15 2006 +0200
+++ b/MoinMoin/user.py	Fri Jun 02 21:01:03 2006 +0200
@@ -223,11 +223,8 @@
         self.auth_attribs = kw.get('auth_attribs', ())
                                        
         # create some vars automatically
-        for tuple in self._cfg.user_form_fields:
-            key = tuple[0]
-            default = self._cfg.user_form_defaults.get(key, '')
-            setattr(self, key, default)
-       
+        self.__dict__.update(self._cfg.user_form_defaults)
+
         if name:
             self.name = name
         elif auth_username: # this is needed for user_autocreate
--- a/docs/CHANGES	Fri Jun 02 19:18:15 2006 +0200
+++ b/docs/CHANGES	Fri Jun 02 21:01:03 2006 +0200
@@ -87,6 +87,7 @@
     * fix show_version to show it in the same way as SystemInfo
     * allow "-" in usernames (fixes "Invalid user name" msg)
     * fixed smiley caching bug (smileys didn't change theme)
+    * fixed backtrace when user removed css_url entry from user_form_fields
 
 Version 1.5.current:
   Developer notes: