|
|
|
@ -41,6 +41,13 @@ if (isset($_GET['url_id'])) { |
|
|
|
|
} |
|
|
|
|
$url_data = UrlManager::get_url_data_from_id($url_id); |
|
|
|
|
$form->addElement('hidden', 'id', $url_data['id']); |
|
|
|
|
// If we're still with localhost (should only happen at the very beginning) |
|
|
|
|
// offer the current URL by default. Once this has been saved, no more |
|
|
|
|
// magic will happen, ever. |
|
|
|
|
if ($url_data['id'] === 1 && $url_data['url'] === 'http://localhost/') { |
|
|
|
|
$https = api_is_https() ? 'https://' : 'http://'; |
|
|
|
|
$url_data['url'] = $https.$_SERVER['HTTP_HOST'].'/'; |
|
|
|
|
} |
|
|
|
|
$form->setDefaults($url_data); |
|
|
|
|
$submit_name = get_lang('Add URL'); |
|
|
|
|
} |
|
|
|
|