Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

morebits: Default protection expirys to infinity #1068

Conversation

Amorymeltzer
Copy link
Collaborator

Various protection expirys only take valid time parameters, and even if not needed (removal of protection), they need to be valid. The API defaults to infinity if missing, but they can't be undefined. Better way of solving #1067; see also #1057.

Various protection expirys only take valid time parameters, and even if not needed (removal of protection), they need to be valid.  The API defaults to `infinity` if missing, but they can't be `undefined`.  Better way of solving wikimedia-gadgets#1067; see also wikimedia-gadgets#1057.
@Amorymeltzer
Copy link
Collaborator Author

As noted, this is a better way of fixing unprotections in twinkleprotect. getInputData (#908/ 6c38a5d) ignores disabled elements, so the expiry for each unprotection level was getting passed as undefined rather than whatever was there before. It doesn't matter what the expiry is, but it needs to be valid or else the API complains.

@Amorymeltzer Amorymeltzer merged commit d498917 into wikimedia-gadgets:master Jul 26, 2020
@Amorymeltzer Amorymeltzer deleted the morebits-defaultprotectioninfinity branch July 26, 2020 15:01
@Amorymeltzer Amorymeltzer added this to the September 2020 update milestone Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant