Skip to content
Snippets Groups Projects
Commit b41607a1 authored by Olivier PEREZ's avatar Olivier PEREZ
Browse files

Redirect poll creator to administration of created poll

parent 1437eaf4
No related branches found
No related tags found
No related merge requests found
...@@ -88,7 +88,6 @@ if (!isset($_SESSION['form']->titre) || !isset($_SESSION['form']->nom) || (($con ...@@ -88,7 +88,6 @@ if (!isset($_SESSION['form']->titre) || !isset($_SESSION['form']->nom) || (($con
} }
} }
exit('<pre>'.print_r($_SESSION, true).'</pre>');
$admin_poll_id = ajouter_sondage( $admin_poll_id = ajouter_sondage(
$_SESSION['form']->titre, $_SESSION['form']->titre,
$_SESSION['form']->commentaires, $_SESSION['form']->commentaires,
...@@ -100,23 +99,14 @@ exit('<pre>'.print_r($_SESSION, true).'</pre>'); ...@@ -100,23 +99,14 @@ exit('<pre>'.print_r($_SESSION, true).'</pre>');
$_SESSION['form']->toutchoix $_SESSION['form']->toutchoix
); );
// Clean Form data in $_SESSION
unset($_SESSION['form']); unset($_SESSION['form']);
exit('<pre>'.print_r($_SESSION, true).'</pre>');
// Delete old polls
Utils::cleaningOldPolls($connect, 'admin/logs_studs.txt'); Utils::cleaningOldPolls($connect, 'admin/logs_studs.txt');
// TODO cleanup $_SESSION + Redirect // Redirect to poll administration
header('Location:' . Utils::getUrlSondage($admin_poll_id, true));
// Don't keep days, hours and choices in memory (in order to make new polls)
//for ($i = 0; $i < count($_SESSION['totalchoixjour']); $i++) {
// unset($_SESSION['horaires'.$i]);
//}
//unset($_SESSION['totalchoixjour']);
//unset($_SESSION['choices']);
//header('Location:' . Utils::getUrlSondage($sondage_admin, true));
exit; exit;
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment