Revert "Use globals instead of WikiFactory::getVarValueByName when on a local wiki"

This reverts commit 386dce0dcda6e94ba58cd140fef8ba4aabb45902.