HomePhabricator

Make database classes handle hyphens in $wgDBname

Description

Make database classes handle hyphens in $wgDBname

  • Add DatabaseDomain class to handle passing domains around.

It also can be cast to and from strings, which are of the same
format as wfWikiId() except with hyphens escaped.

  • Make IDatabase::getDomainID() use these IDs so they can be

passed into LoadBalancer::getConnection() and friends without
breaking on sites with a hyphen in the DB name.

  • Add more LBFactory unit tests for domains.

Bug: T145840
Change-Id: Icfed62b251af8cef706a899197c3ccdb730ef4d1

Details

Provenance
aaronAuthored on Sep 17 2016, 4:39 AM
LegoktmCommitted on Sep 17 2016, 10:29 PM
Parents
rMWf0d760a0773e: Merge "Show warnings in HTMLForm and warnings as warnings on Login/Signup form"
Branches
Unknown
Tags
Unknown
ChangeId
Icfed62b251af8cef706a899197c3ccdb730ef4d1