public function updateGeoIPLinks()
    {
        $this->dieIfGeolocationAdminIsDisabled();
        Piwik::checkUserHasSuperUserAccess();
        if ($_SERVER["REQUEST_METHOD"] == "POST") {
            Json::sendHeaderJSON();
            try {
                $this->checkTokenInUrl();

                if ($this->isGeoIp2Enabled()) {
                    GeoIP2AutoUpdater::setUpdaterOptionsFromUrl();
                } else {
                    GeoIPAutoUpdater::setUpdaterOptionsFromUrl();
                }

                // if there is a updater URL for a database, but its missing from the misc dir, tell
                // the browser so it can download it next
                $info = $this->getNextMissingDbUrlInfo();
                if ($info !== false) {
                    return json_encode($info);
                } else {
                    $view = new View("@UserCountry/_updaterNextRunTime");
                    if ($this->isGeoIp2Enabled()) {
                        $view->nextRunTime = GeoIP2AutoUpdater::getNextRunTime();
                    } else {
                        $view->nextRunTime = GeoIPAutoUpdater::getNextRunTime();
                    }
                    $nextRunTimeHtml = $view->render();
                    return json_encode(array('nextRunTime' => $nextRunTimeHtml));
                }
            } catch (Exception $ex) {
                return json_encode(array('error' => $ex->getMessage()));
            }
        }
    }