diff --git a/application/controllers/Options.php b/application/controllers/Options.php index 29d9f6619..f47a46384 100644 --- a/application/controllers/Options.php +++ b/application/controllers/Options.php @@ -438,10 +438,17 @@ class Options extends CI_Controller { $this->load->view('interface_assets/footer'); } else { $saved = false; - $map_tile_server_copyright = 'Map data © ' . $this->input->post('copyright_text', true) . ''; - $saved = $this->optionslib->update('map_tile_server', $this->input->post('maptile_server_url', true), 'yes'); - $saved = $this->optionslib->update('map_tile_server_dark', $this->input->post('maptile_server_url_dark', true), 'yes'); - $saved = $this->optionslib->update('map_tile_subdomains', $this->input->post('subdomain_system', true), 'yes'); + if ($this->input->post('reset_defaults') == '1') { + $map_tile_server_copyright = 'Map data © OpenStreetMap'; + $saved = $this->optionslib->update('map_tile_server', 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', 'yes'); + $saved = $this->optionslib->update('map_tile_server_dark', 'https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png', 'yes'); + $saved = $this->optionslib->update('map_tile_subdomains', 'abc', 'yes'); + } else { + $map_tile_server_copyright = 'Map data © ' . $this->input->post('copyright_text', true) . ''; + $saved = $this->optionslib->update('map_tile_server', $this->input->post('maptile_server_url', true), 'yes'); + $saved = $this->optionslib->update('map_tile_server_dark', $this->input->post('maptile_server_url_dark', true), 'yes'); + $saved = $this->optionslib->update('map_tile_subdomains', $this->input->post('subdomain_system', true), 'yes'); + } $saved = $this->optionslib->update('map_tile_server_copyright', $map_tile_server_copyright, 'yes'); // Also clean up static map images diff --git a/application/views/options/maptiles.php b/application/views/options/maptiles.php index 092517f8a..33b09645d 100644 --- a/application/views/options/maptiles.php +++ b/application/views/options/maptiles.php @@ -43,37 +43,39 @@ -
- = __("This modifies the map source in various locations within Wavelog. Do not change any values here unless you are confident in what you are doing."); ?> -
-+ = __("This modifies the map source in various locations within Wavelog. Do not change any values here unless you are confident in what you are doing."); ?> +
+