aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--view/feedback.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/view/feedback.php b/view/feedback.php
index f603dbf..c4ba146 100644
--- a/view/feedback.php
+++ b/view/feedback.php
@@ -6,15 +6,16 @@ if(!$feedback->isEnabled())
$info = $_POST;
-if(!$feedback->validate($info)) {
- echo $tpl->render(array(
- 'page' => 'feedback',
- 'title' => 'Give Feedback',
- 'room' => null,
- ));
-}
-else
+if($feedback->validate($info))
{
$feedback->store($info);
- echo 1;
+
+ header('Content-Type: application/json');
+ echo json_encode(true);
+ exit;
}
+
+echo $tpl->render(array(
+ 'page' => 'feedback',
+ 'title' => 'Give Feedback',
+));