Revision: 4031 Author: misza13 Date: 2007-08-12 20:25:38 +0000 (Sun, 12 Aug 2007)
Log Message: ----------- Added support for the "prevent user from sending e-mail" checkbox on Special:Blockip (block()'s emailBan parameter; default=False).
Modified Paths: -------------- trunk/pywikipedia/userlib.py
Modified: trunk/pywikipedia/userlib.py =================================================================== --- trunk/pywikipedia/userlib.py 2007-08-11 21:11:52 UTC (rev 4030) +++ trunk/pywikipedia/userlib.py 2007-08-12 20:25:38 UTC (rev 4031) @@ -97,7 +97,7 @@ else: break
- def block(self, expiry=None, reason=None, anonOnly=True, noSignup=False, enableAutoblock=False): + def block(self, expiry=None, reason=None, anonOnly=True, noSignup=False, enableAutoblock=False, emailBan=False): """ Block the user.
@@ -108,6 +108,7 @@ anonOnly - is the block affecting only anonymous users? noSignup - does the block disable account creation? enableAutoblock - is autoblock enabled on the block? + emailBan - prevent user from sending e-mail?
The default values for block options are set to as most unrestrictive """ @@ -134,6 +135,7 @@ 'wpAnonOnly': boolStr[anonOnly], 'wpCreateAccount': boolStr[noSignup], 'wpEnableAutoblock': boolStr[enableAutoblock], + 'wpEmailBan': boolStr[emailBan], 'wpBlock': 'Block this user', 'wpEditToken': token }