diff options
-rw-r--r-- | install.php | 4 | ||||
-rw-r--r-- | templates/show_install_account.inc.php | 2 | ||||
-rw-r--r-- | templates/show_install_config.inc | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/install.php b/install.php index 49090bf9..783f2c18 100644 --- a/install.php +++ b/install.php @@ -64,7 +64,9 @@ $username = scrub_in($_REQUEST['local_username']); $password = scrub_in($_REQUEST['local_pass']); $hostname = scrub_in($_REQUEST['local_host']); $database = scrub_in($_REQUEST['local_db']); -$php_self = preg_replace("/^\/(.+\.php)\/?.*/","$1",$_SERVER['PHP_SELF']); +if ($_SERVER['HTTPS'] == 'on') { $http_type = "https://"; } +else { $http_type = "http://"; } +$php_self = $http_type . $_SERVER['HTTP_HOST'] . "/" . preg_replace("/^\/(.+\.php)\/?.*/","$1",$_SERVER['PHP_SELF']); $error = new Error(); /* Catch the Current Action */ diff --git a/templates/show_install_account.inc.php b/templates/show_install_account.inc.php index d8a0f721..0206eacf 100644 --- a/templates/show_install_account.inc.php +++ b/templates/show_install_account.inc.php @@ -52,7 +52,7 @@ <dd><?php echo _("This step creates your initial Ampache admin account. Once your admin account has been created you will be directed to the login page"); ?></dd> </dl> <br /><br /> -<span class="header2">Create Admin Account</span> +<span class="header2"><?php echo _('Create Admin Account'); ?></span> <?php echo $GLOBALS['error']->print_error('general'); ?> <form method="post" action="<?php echo $GLOBALS['php_self'] . "?action=create_account"; ?>" enctype="multipart/form-data" > <table cellpadding="5" cellspacing="0" border="0"> diff --git a/templates/show_install_config.inc b/templates/show_install_config.inc index a8a46466..a5c926f3 100644 --- a/templates/show_install_config.inc +++ b/templates/show_install_config.inc @@ -122,7 +122,7 @@ <tr> <td> </td> <td> - <a href="<?php echo $http_type . $_SERVER['HTTP_HOST'] . "/" . $GLOBALS['php_self']; ?>?action=show_create_config&local_db=<?php echo $_REQUEST['local_db']; ?>&local_host=<?php echo $_REQUEST['local_host']; ?>">[<?php echo _("Check for Config"); ?>]</a> + <a href="<?php echo $GLOBALS['php_self']; ?>?action=show_create_config&local_db=<?php echo $_REQUEST['local_db']; ?>&local_host=<?php echo $_REQUEST['local_host']; ?>">[<?php echo _("Check for Config"); ?>]</a> </td> </tr> </table> |