HomePhabricator

Clean up and make SpecialGlobalBlock use FormSpecialPage

This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

Clean up and make SpecialGlobalBlock use FormSpecialPage

This simplifies the code a lot and increases its readability.

  • Some changes have also been made to the interface in this commit

for simplicity. Notably, labels for expiry and reason other selector
is now shown only next to the dropdown menu. Also, "Options" label
next to anon-only and also-local checkbox has also been removed.

  • The subtitle on the success page is now buildSubtitleLinks() instead.

This was changed because there is no real reason to show the success
message twice and the links are more useful.

  • 'globalblocking-block-errors' message has also been removed as

this just adds noise to the page and specific error messages
are more helpful.

  • Previously, the database was queried whenever Special:GlobalBlock

was visited but this is now done only if the target is specified.

  • This also fixes T98891 making the log entry target consistent with

the actual IP range that got inserted to the table. This allows us to
show the log entry for newer blocks made for IP ranges.

  • buildExpirySelector() has also been rewritten; code is similar to

SpecialBlock::getSuggestedDurations() now.

Before: https://phabricator.wikimedia.org/F164217
After: https://phabricator.wikimedia.org/F164219

Bug: T60537
Bug: T98891
Change-Id: I3f7dc9e5e71b1066d3dcb5847e5c434220614a82

Commit No Longer Exists

This commit no longer exists in the repository.