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

@@ -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"; ?>