diff options
Diffstat (limited to 'templates/show_install_config.inc.php')
-rw-r--r-- | templates/show_install_config.inc.php | 12 |
1 files changed, 7 insertions, 5 deletions
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> </td> <td> - <?php $check_url = WEB_PATH . "?action=show_create_config&htmllang=$htmllang&charset=$charset&local_db=" . $_REQUEST['local_db'] . "&local_host=" . $_REQUEST['local_host']; ?> + <?php $check_url = $web_path . "/install.php?action=show_create_config&htmllang=$htmllang&charset=$charset&local_db=" . $_REQUEST['local_db'] . "&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&htmllang=$htmllang&charset=$charset"; ?>" enctype="multipart/form-data"> + <form method="post" action="<?php echo $web_path . "/install.php?action=show_create_account&htmllang=$htmllang&charset=$charset"; ?>" enctype="multipart/form-data"> <input type="submit" value="<?php echo T_('Continue to Step 3'); ?>" /> </form> </div> |