protected void initVars()
    {
        String temp = scriptHttp + "://" + domain + scriptPath;
        // MediaWiki has inbuilt maxlag functionality, see [[mw:Manual:Maxlag
        // parameter]]. Let's exploit it.
        if (maxlag >= 0)
        {
            apiUrl = temp + "/api.php?maxlag=" + maxlag + "&format=xml&";
            base = temp + "/index.php?maxlag=" + maxlag + "&title=";
        }
        else
        {
            apiUrl = temp + "/api.php?format=xml&";
            base = temp + "/index.php?title=";
        }
        query = apiUrl + "action=query&";
        if (resolveredirect)
            query += "redirects&";
    }