Use "Unknown user" instead of an empty user name.
authordaniel <daniel.kinzler@wikimedia.de>
Mon, 28 May 2018 19:19:11 +0000 (21:19 +0200)
committerJames D. Forrester <jforrester@wikimedia.org>
Tue, 18 Sep 2018 17:53:00 +0000 (10:53 -0700)
commitd6b989b5506c4afc5f4da47d5cbf394e278738c2
tree178bc9947a5456a264093abbb04fc3fa2a463bd7
parentf5469d36602cb2a95396830b14e9a631d698f3a6
Use "Unknown user" instead of an empty user name.

This changes the user name to "User unknown" when constructing a RevisionRecord
from a database row that has an empty ar_user_text resp rev_user_text field.

This may cause "User unknown" to be written to the database, if the
RevisionRecord is used as the basis for a new revision that is being created,
particularly during undeletion. Since "Unknown user" is listed in
$wgReservedUsernames, this should never lead to conflicts with actual user
names.

It is assumed that empty ar_user_text and rev_user_text fields will be
fixed during migration to the new actor based database schema.

Bug: T195692
Change-Id: I506c513b019778d83741e47f0d11093f5ab67a54
includes/DefaultSettings.php
includes/Storage/RevisionStore.php
tests/phpunit/includes/Storage/RevisionStoreDbTestBase.php