protected function doExportMap($name) { global $CORE; if (!$name) { throw new FieldInputError(null, l('Please choose a map')); } if (count($CORE->getAvailableMaps('/^' . preg_quote($name) . '$/')) == 0) { throw new FieldInputError(null, l('The given map name is invalid')); } $MAPCFG = new GlobalMapCfg($name); return $MAPCFG->exportMap(); }