summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/install_header.inc.php1
-rw-r--r--templates/show_install.inc.php3
-rw-r--r--templates/show_install_account.inc.php3
-rw-r--r--templates/show_install_config.inc.php12
-rw-r--r--templates/show_install_lang.inc.php3
5 files changed, 10 insertions, 12 deletions
diff --git a/templates/install_header.inc.php b/templates/install_header.inc.php
index 8b5c6434..112ee4b2 100644
--- a/templates/install_header.inc.php
+++ b/templates/install_header.inc.php
@@ -20,7 +20,6 @@
*
*/
-$prefix = realpath(dirname(__FILE__). "/../");
?>
<?php if (!defined('INSTALL')) { exit; } ?>
<?php $results = 0; ?>
diff --git a/templates/show_install.inc.php b/templates/show_install.inc.php
index 7350f431..dcbae665 100644
--- a/templates/show_install.inc.php
+++ b/templates/show_install.inc.php
@@ -20,7 +20,6 @@
*
*/
-$prefix = realpath(dirname(__FILE__). "/../");
require $prefix . '/templates/install_header.inc.php';
?>
<div class="content">
@@ -34,7 +33,7 @@ require $prefix . '/templates/install_header.inc.php';
<?php Error::display('general'); ?>
<br />
<span class="header2"><?php echo T_('Insert Ampache Database'); ?></span>
- <form method="post" action="<?php echo WEB_PATH . "?action=create_db&amp;htmllang=$htmllang&amp;charset=$charset"; ?>" enctype="multipart/form-data" >
+ <form method="post" action="<?php echo $web_path . "/install.php?action=create_db&amp;htmllang=$htmllang&amp;charset=$charset"; ?>" enctype="multipart/form-data" >
<table>
<tr>
<td class="align"><?php echo T_("Desired Database Name"); ?></td>
diff --git a/templates/show_install_account.inc.php b/templates/show_install_account.inc.php
index e3a0a0d1..9baa2eeb 100644
--- a/templates/show_install_account.inc.php
+++ b/templates/show_install_account.inc.php
@@ -20,7 +20,6 @@
*
*/
-$prefix = realpath(dirname(__FILE__). "/../");
require $prefix . '/templates/install_header.inc.php';
?>
<div class="content">
@@ -33,7 +32,7 @@ require $prefix . '/templates/install_header.inc.php';
<?php Error::display('general'); ?>
<br />
<span class="header2"><?php echo T_('Create Admin Account'); ?></span>
- <form method="post" action="<?php echo WEB_PATH . "?action=create_account&amp;htmllang=$htmllang&amp;charset=$charset"; ?>" enctype="multipart/form-data" >
+ <form method="post" action="<?php echo $web_path . "/install.php?action=create_account&amp;htmllang=$htmllang&amp;charset=$charset"; ?>" enctype="multipart/form-data" >
<table>
<tr>
<td class="align"><?php echo T_('Username'); ?></td>
diff --git a/templates/show_install_config.inc.php b/templates/show_install_config.inc.php
index 9ec17b1f..ced21e38 100644
--- a/templates/show_install_config.inc.php
+++ b/templates/show_install_config.inc.php
@@ -20,7 +20,9 @@
*
*/
-$prefix = realpath(dirname(__FILE__). "/../");
+// Try to guess the web path
+$web_path_guess = rtrim(dirname($_SERVER['PHP_SELF']), '\/');
+
require $prefix . '/templates/install_header.inc.php';
?>
<div class="content">
@@ -35,11 +37,11 @@ require $prefix . '/templates/install_header.inc.php';
<span class="header2"><?php echo T_('Generate Config File'); ?></span>
<?php Error::display('config'); ?>
-<form method="post" action="<?php echo WEB_PATH . "?action=create_config"; ?>" enctype="multipart/form-data" >
+<form method="post" action="<?php echo $web_path . "/install.php?action=create_config"; ?>" enctype="multipart/form-data" >
<table>
<tr>
<td class="align"><?php echo T_('Web Path'); ?></td>
- <td class="align"><input type="text" name="web_path" value="<?php echo $web_path; ?>" /></td>
+ <td class="align"><input type="text" name="web_path" value="<?php echo scrub_out($web_path_guess); ?>" /></td>
</tr>
<tr>
<td class="align"><?php echo T_('Database Name'); ?></td>
@@ -90,13 +92,13 @@ require $prefix . '/templates/install_header.inc.php';
<tr>
<td>&nbsp;</td>
<td>
- <?php $check_url = WEB_PATH . "?action=show_create_config&amp;htmllang=$htmllang&amp;charset=$charset&amp;local_db=" . $_REQUEST['local_db'] . "&amp;local_host=" . $_REQUEST['local_host']; ?>
+ <?php $check_url = $web_path . "/install.php?action=show_create_config&amp;htmllang=$htmllang&amp;charset=$charset&amp;local_db=" . $_REQUEST['local_db'] . "&amp;local_host=" . $_REQUEST['local_host']; ?>
<a href="<?php echo $check_url; ?>">[<?php echo T_('Recheck Config'); ?>]</a>
</td>
</tr>
</table>
<br />
- <form method="post" action="<?php echo WEB_PATH . "?action=show_create_account&amp;htmllang=$htmllang&amp;charset=$charset"; ?>" enctype="multipart/form-data">
+ <form method="post" action="<?php echo $web_path . "/install.php?action=show_create_account&amp;htmllang=$htmllang&amp;charset=$charset"; ?>" enctype="multipart/form-data">
<input type="submit" value="<?php echo T_('Continue to Step 3'); ?>" />
</form>
</div>
diff --git a/templates/show_install_lang.inc.php b/templates/show_install_lang.inc.php
index 8fa5240b..559b3957 100644
--- a/templates/show_install_lang.inc.php
+++ b/templates/show_install_lang.inc.php
@@ -20,7 +20,6 @@
*
*/
-$prefix = realpath(dirname(__FILE__). "/../");
require $prefix . '/templates/install_header.inc.php';
?>
<?php require_once $prefix . '/templates/show_install_check.inc.php'; ?>
@@ -30,7 +29,7 @@ require $prefix . '/templates/install_header.inc.php';
<p>
<?php Error::display('general'); ?>
</p>
-<form method="post" action="<?php echo WEB_PATH . "?action=init"; ?>" enctype="multipart/form-data" >
+<form method="post" action="<?php echo $web_path . "/install.php?action=init"; ?>" enctype="multipart/form-data" >
<?php
$languages = get_languages();