Merge pull request #113 from Boyquotes/master
Correct link during the installation process and config url website
This commit is contained in:
@@ -21,7 +21,7 @@ if (!file_exists(THELIA_CONF_DIR . 'database.yml') && !defined('THELIA_INSTALL_M
|
||||
define('THELIA_INSTALL_MODE', true);
|
||||
} else {
|
||||
$request = \Thelia\Core\HttpFoundation\Request::createFromGlobals();
|
||||
header('location: '.$request->getSchemeAndHttpHost() . '/install');
|
||||
header('location: '.$request->getUriForPath() . '/install');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,6 +73,10 @@ if (!$err && $_SESSION['install']['step'] != $step) {
|
||||
|
||||
$_SESSION['install']['step'] = $step;
|
||||
|
||||
// Retrieve the website url
|
||||
$url = $_SERVER['PHP_SELF'];
|
||||
$website_url = preg_replace("#/install/[a-z](.*)#" ,'', $url);
|
||||
|
||||
?>
|
||||
<form action="end.php" method="POST" >
|
||||
<div class="well">
|
||||
@@ -98,7 +102,7 @@ $_SESSION['install']['step'] = $step;
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="site_name">website url :</label>
|
||||
<input id="site_name" class="form-control" type="text" name="url_site" placeholder="" value="http://<?php echo $_SERVER['SERVER_NAME']; ?>" required>
|
||||
<input id="site_name" class="form-control" type="text" name="url_site" placeholder="" value="http://<?php echo $_SERVER['SERVER_NAME'].$website_url; ?>" required>
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<div class="control-btn">
|
||||
|
||||
@@ -58,6 +58,11 @@ $fs->remove(THELIA_ROOT . '/cache/dev');
|
||||
|
||||
$request = \Thelia\Core\HttpFoundation\Request::createFromGlobals();
|
||||
$_SESSION['install']['step'] = $step;
|
||||
|
||||
// Retrieve the website url
|
||||
$url = $_SERVER['PHP_SELF'];
|
||||
$website_url = preg_replace("#/install/[a-z](.*)#" ,'', $url);
|
||||
|
||||
?>
|
||||
|
||||
<div class="well">
|
||||
@@ -69,8 +74,8 @@ $_SESSION['install']['step'] = $step;
|
||||
</p>
|
||||
|
||||
<p class="lead text-center">
|
||||
<a href="<?php echo $request->getSchemeAndHttpHost(); ?>/admin">Go to back office</a>
|
||||
<a href="<?php echo $request->getSchemeAndHttpHost().$website_url; ?>/admin">Go to back office</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<?php include "footer.php"; ?>
|
||||
<?php include "footer.php"; ?>
|
||||
|
||||
Reference in New Issue
Block a user