Page MenuHomePhabricator
Authored By
DannyS712
May 1 2020, 4:29 AM
Size
1 KB
Referenced Files
None
Subscribers
None
https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/refs/heads/master/maintenance/tables.sql
ipblocks_restrictions
Note that:
`ir_type` is either 1 or 2, shown as `page` or `namespace` to ease understanding
`ir_value` can only be an int, meaning that it cannot hold the action as a string
Multiple rows for a single block with multiple restrictions
Proposed implementation:
ActionRestriction, like for namespace / page
type: 3
ir_value - constant mapping with string to int, more added by hook (for thanks)
ActionRestriction::ACTION_CREATE_VALUE => 1
ActionRestriction::ACTION_UPLOAD_VALUE => 2
run hook
ACTION_THANK_VALUE = 101
Hook requires that no values override existing mapping
Values 1-100 are reserved for core
+-----------+-----------+----------+
| ir_ipb_id | type | ir_value |
+-----------+-----------+----------+
| 9562223 | action | 1 |
| 9562223 | action | 2 |
| 9563237 | action | 101 |
+-----------+-----------+----------+
^ 1 block from creating and uploading, and another block from thanks

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
8395458
Default Alt Text
raw.txt (1 KB)

Event Timeline