summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-01-05 02:08:58 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-01-05 02:08:58 +0000
commit75aa0cf62494939224098ca60bbef000b21a3c23 (patch)
treeafefead729f02f8cad938422559932137d57f0ae
parent318f913669b63598b1ba1402c492b1751bd32c41 (diff)
downloadampache-75aa0cf62494939224098ca60bbef000b21a3c23.tar.gz
ampache-75aa0cf62494939224098ca60bbef000b21a3c23.tar.bz2
ampache-75aa0cf62494939224098ca60bbef000b21a3c23.zip
fixed install script for when your in a subdir
-rw-r--r--install.php4
-rw-r--r--templates/show_install_account.inc.php2
-rw-r--r--templates/show_install_config.inc2
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>&nbsp;</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>