mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-23 21:53:35 +00:00
Use 'default' as default group when reading filters from history
This was NULL for old entries, because no default was added in I758795f01eaf3ff56c5720d660cd989ef95764a7 (see T263324) Bug: T269314 Change-Id: I5af8b0d3a9d7b6d2570cf79bbbe8b5b170ba1230
This commit is contained in:
parent
753a0dc482
commit
0fb033775f
|
@ -312,6 +312,11 @@ class FilterLookup implements IDBAccessObject {
|
|||
private function getFilterFromHistory( stdClass $row ) : Filter {
|
||||
$af_row = new stdClass;
|
||||
|
||||
if ( $row->afh_group === null ) {
|
||||
// FIXME Make the field NOT NULL and add default (T263324)
|
||||
$row->afh_group = 'default';
|
||||
}
|
||||
|
||||
foreach ( AbuseFilter::HISTORY_MAPPINGS as $af_col => $afh_col ) {
|
||||
$af_row->$af_col = $row->$afh_col;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue