[Mailman-Users] Integration with PHP

Mark Sapiro mark at msapiro.net
Thu Dec 18 03:09:35 CET 2008


Mark Sapiro wrote:

>Alberto Pereira wrote:
>>My question is what is the GET variable to change the moderation bit?
>
>The issue is that when admin.py processes the 'mod' setting, it doesn't
>actually check to see if the setting is present in the CGI data, it
>just sets the users moderation on if the box is checked and off
>otherwise, even if it isn't present in the CGI data.
>
>You could 'fix' Mailman/Cgi/admin.py by changing
>
>            moderate = not not cgidata.getvalue(quser+'_mod')
>            mlist.setMemberOption(user, mm_cfg.Moderate, moderate)
>
>to
>
>            if cgidata.has_key(quser+'_mod'):
>                moderate = not not cgidata.getvalue(quser+'_mod')
>                mlist.setMemberOption(user, mm_cfg.Moderate, moderate)
>
>Otherwise, you need to get the user's moderate setting first and then
>set it accordingly.


I think the same issue exists with the user's real name. You may also
want to change

            newname = cgidata.getvalue(quser+'_realname', '')
            newname = Utils.canonstr(newname, mlist.preferred_language)
            mlist.setMemberName(user, newname)

to

            if cgidata.has_key(quser+'_realname'):
                newname = cgidata.getvalue(quser+'_realname')
                newname = Utils.canonstr(newname,
mlist.preferred_language)
                mlist.setMemberName(user, newname)

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Users mailing list