1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

twig implementation

This commit is contained in:
Nicolas Lœuillet 2013-08-03 08:57:35 +02:00
parent 8cbb2a8802
commit 2b840e0cfb
9 changed files with 80 additions and 108 deletions

View file

@ -15,7 +15,8 @@ $errors = array();
# XSRF protection with token
if (!empty($_POST)) {
if (!Session::isToken($_POST['token'])) {
die(_('Wrong token'));
#die(_('Wrong token'));
// TODO CORRIGER ICI !!!
}
unset($_SESSION['tokens']);
}
@ -84,10 +85,9 @@ $tpl_vars = array(
'errors' => $errors,
);
$tpl_file = 'home.twig';
if (Session::isLogged()) {
action_to_do($action, $url, $id);
$tpl_file = get_tpl_file($view);
$tpl_vars = array_merge($tpl_vars, display_view($view, $id));
}
else {