[4.4] Sync custom file with upstream 4.4 and reapply custom patch

DO NOT COMMIT until Bugzilla has been upgraded to 4.4.

Sync custom file with upstream 4.4 and reapply custom patch for
https://bugzilla.wikimedia.org/show_bug.cgi?id=43130

Change-Id: If96219d81b5b05e6513d6c95f524d11c4d1e9aaf