diff --git a/adminstuds.php b/adminstuds.php index 999d978..72120d5 100644 --- a/adminstuds.php +++ b/adminstuds.php @@ -110,6 +110,10 @@ if (isset($_POST['update_poll_info'])) { } } +// TODO Handle Add/Edit vote form + +// TODO Handle Add comment form + // ------------------------------- // Delete a comment // ------------------------------- diff --git a/app/classes/Framadate/Services/PollService.php b/app/classes/Framadate/Services/PollService.php index 33959f0..bd7c6c7 100644 --- a/app/classes/Framadate/Services/PollService.php +++ b/app/classes/Framadate/Services/PollService.php @@ -57,6 +57,7 @@ class PollService { } function addComment($poll_id, $name, $comment) { + // TODO Check if there is no duplicate before to add a new comment return $this->connect->insertComment($poll_id, $name, $comment); } diff --git a/old_adminstuds.php b/old_adminstuds.php index 53a0122..7a734d2 100644 --- a/old_adminstuds.php +++ b/old_adminstuds.php @@ -18,56 +18,6 @@ */ namespace Framadate; -session_start(); - -//setlocale(LC_TIME, "fr_FR"); -include_once __DIR__ . '/app/inc/init.php'; - -if (file_exists('bandeaux_local.php')) { - include_once('bandeaux_local.php'); -} else { - include_once('bandeaux.php'); -} - -// recuperation du numero de sondage admin (24 car.) dans l'URL -if (!empty($_GET['sondage']) && is_string($_GET['sondage']) && strlen($_GET['sondage']) === 24) { - $admin_poll_id = $_GET["sondage"]; - // on découpe le résultat pour avoir le numéro de sondage (16 car.) - $poll_id = substr($admin_poll_id, 0, 16); -} - -if (preg_match(";[\w\d]{24};i", $admin_poll_id)) { - $prepared = $connect->prepare('SELECT * FROM sondage WHERE admin_poll_id = ?'); - $prepared->execute(array($admin_poll_id)); - $poll = $prepared->fetch(); - $prepared->closeCursor(); - - $prepared = $connect->prepare('SELECT * FROM sujet_studs WHERE id_sondage = ?'); - $prepared->execute(array($poll_id)); - $sujets = $prepared->fetchAll(); - - $prepared = $connect->prepare('SELECT * FROM user_studs WHERE id_sondage = ? order by id_users'); - $prepared->execute(array($poll_id)); - $users = $prepared->fetchAll(); -} - -//verification de l'existence du sondage, s'il n'existe pas on met une page d'erreur -if (!$poll || !$sujets) { - Utils::print_header( _('Error!')); - - bandeau_titre(_('Error!')); - - echo ' -
' . _('Back to the homepage of ') . ' ' . NOMAPPLICATION . '
-