Could we use $wgDBName instead of WikiFactory::IDtoDB ?