X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fsurvey.php;h=94b39b9b521c40f7e7bdbb4ca09dbe83d2ca0c2b;hb=330ffaa012073e66a5c94a6dce3ef5c8e32f67b8;hp=b28aea73a066fd68030a1035a530d6c9ed81cf75;hpb=4f494e74bb1310de55ce335324a966e31b6c72cb;p=platal.git diff --git a/modules/survey.php b/modules/survey.php index b28aea7..94b39b9 100644 --- a/modules/survey.php +++ b/modules/survey.php @@ -1,6 +1,6 @@ $this->make_hook('index', AUTH_PUBLIC), - 'survey/vote' => $this->make_hook('vote', AUTH_PUBLIC), - 'survey/result' => $this->make_hook('result', AUTH_PUBLIC), - 'survey/edit' => $this->make_hook('edit', AUTH_COOKIE), - 'survey/ajax' => $this->make_hook('ajax', AUTH_COOKIE), - 'survey/admin' => $this->make_hook('admin', AUTH_MDP, 'admin'), - 'survey/admin/edit' => $this->make_hook('adminEdit', AUTH_MDP, 'admin'), + 'survey' => $this->make_hook('index', AUTH_PUBLIC), + 'survey/vote' => $this->make_hook('vote', AUTH_PUBLIC), + 'survey/result' => $this->make_hook('result', AUTH_PUBLIC), + 'survey/edit' => $this->make_hook('edit', AUTH_COOKIE), + 'survey/ajax' => $this->make_hook('ajax', AUTH_COOKIE), + 'survey/admin' => $this->make_hook('admin', AUTH_MDP, 'admin'), + 'survey/admin/edit' => $this->make_hook('adminEdit', AUTH_MDP, 'admin'), 'survey/admin/valid' => $this->make_hook('adminValidate', AUTH_MDP, 'admin'), - 'survey/admin/del' => $this->make_hook('adminDelete', AUTH_MDP, 'admin'), + 'survey/admin/del' => $this->make_hook('adminDelete', AUTH_MDP, 'admin'), ); } // }}} @@ -109,7 +109,7 @@ class SurveyModule extends PLModule return PL_DO_AUTH; } if ($show == 'csv') { - header('Content-Type: text/csv; charset="UTF-8"'); + pl_content_headers("text/csv"); echo $survey->toCSV(); exit; } else { @@ -364,7 +364,7 @@ class SurveyModule extends PLModule function handler_ajax(&$page, $type) { $this->load('survey.inc.php'); - header('Content-Type: text/html; charset="UTF-8"'); + pl_content_headers("text/html"); if (Survey::isType($type)) { // when type has been chosen, the form is updated to fit exactly the type of question chosen $page->changeTpl('survey/edit_new.tpl', NO_SKIN); $page->assign('survey_types', Survey::getTypes());