clear cache at end process

This commit is contained in:
Manuel Raynaud
2013-10-24 08:54:20 +02:00
parent 3f7300bdee
commit 54242eef43
3 changed files with 48 additions and 8 deletions

View File

@@ -93,8 +93,8 @@ $_SESSION['install']['step'] = $step;
<input id="email_contact" class="form-control" type="text" name="email_contact" placeholder="foo@bar.com" value="" required>
</div>
<div class="form-group">
<label for="site_name">Site name :</label>
<input id="site_name" class="form-control" type="text" name="site_name" placeholder="" value="" required>
<label for="site_name">Company name :</label>
<input id="site_name" class="form-control" type="text" name="company_name" placeholder="" value="" required>
</div>
<div class="clearfix">
<div class="control-btn">

View File

@@ -35,23 +35,38 @@ if($_SESSION['install']['step'] == 5) {
->setLastname('admin')
->save();
$config = new \Thelia\Model\Config();
$config->setName('contact_email')
->setValue($_POST['email_contact'])
->save();
;
\Thelia\Model\ConfigQuery::create()
->filterByName('contact_email')
->update(array('Value' => $_POST['email_contact']));
\Thelia\Model\ConfigQuery::create()
->filterByName('company_name')
->update(array('Value' => $_POST['company_name']));
}
//clean up cache directories
$fs = new \Symfony\Component\Filesystem\Filesystem();
$fs->remove(THELIA_ROOT . '/cache/prod');
$fs->remove(THELIA_ROOT . '/cache/dev');
$request = \Thelia\Core\HttpFoundation\Request::createFromGlobals();
$_SESSION['install']['step'] = $step;
?>
<div class="well">
<p class="lead text-center">
Thank you have installed Thelia
Thanks, you have installed Thelia
</p>
<p class="lead text-center">
Don't forget to delete the web/install directory.
</p>
<p class="lead text-center">
<a href="<?php echo $request->getSchemeAndHttpHost(); ?>/admin">Go to back office</a>
</p>
</div>
<?php include "footer.php"; ?>