# HG changeset patch # User Matti Hamalainen # Date 1395230897 -7200 # Node ID d9e51ab585030eb9235f8f18c4c4ac1289a607bb # Parent dc16903bf0045538f3978e42e513cc727fd3e641 Improve the bootstrap configuration process. diff -r dc16903bf004 -r d9e51ab58503 index.php --- a/index.php Wed Mar 19 13:54:47 2014 +0200 +++ b/index.php Wed Mar 19 14:08:17 2014 +0200 @@ -1,6 +1,12 @@ \n". "\n". diff -r dc16903bf004 -r d9e51ab58503 tools/makegmaps.php --- a/tools/makegmaps.php Wed Mar 19 13:54:47 2014 +0200 +++ b/tools/makegmaps.php Wed Mar 19 14:08:17 2014 +0200 @@ -186,13 +186,13 @@ if (substr($sprefix, 0, 7) != "http://" && substr($sprefix, 0, 8) != "https://") { - echo "Prefix must start with http:// or https://\n"; + echo "URL must start with http:// or https://\n"; return FALSE; } else if (substr($sprefix, -1) != "/") { - echo "Prefix must end with /\n"; + echo "URL must end with /\n"; return FALSE; } else @@ -253,6 +253,30 @@ "You will be asked some information this time, which will be\n". "and saved for later use in file '".$gmapsConfig."'\n"; + $sdone = FALSE; + while (!$sdone) + { + $cfg["pageBaseURL"] = stInputPrompt( + "Enter base URL for the map page. For example: http://foobar.com/map/\n", + FALSE, "stValidateURLPrefix"); + $sdone = stYesNoPrompt("The page base URL to be used is \"".$cfg["pageBaseURL"]."\", e.g.\n". + "index.php would be: \"".$cfg["pageBaseURL"]."index.php\"\n". + "Is this correct?"); + echo "\n"; + } + + $sdone = FALSE; + while (!$sdone) + { + $cfg["urlTilePrefix"] = stInputPrompt( + "Enter URL prefix for tiles. For example: http://foobar.com/map/tiles/\n", + $cfg["pageBaseURL"]."tiles/", "stValidateURLPrefix"); + $sdone = stYesNoPrompt("The URL prefix to be used is \"".$cfg["urlTilePrefix"]."\", e.g.\n". + "htaccess to be created would be: \"".$cfg["urlTilePrefix"]."sea.png\"\n". + "Is this correct?"); + echo "\n"; + } + stQueryConfigItems(1); stQueryConfigItems(2); @@ -262,17 +286,6 @@ stQueryConfigItems(3); - $sdone = FALSE; - while (!$sdone) - { - $cfg["urlTilePrefix"] = stInputPrompt( - "Enter URL prefix for tiles. For example: http://foobar.com/map/tiles/\n", - FALSE, "stValidateURLPrefix"); - $sdone = stYesNoPrompt("The URL prefix to be used is \"".$cfg["urlTilePrefix"]."\", e.g.\n". - "htaccess to be created would be: \"".$cfg["urlTilePrefix"]."sea.png\"\n". - "Is this correct?"); - echo "\n"; - } stOutputToFile($gmapsConfig, ""); }