aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--index.php6
-rw-r--r--view/feedback.php3
2 files changed, 3 insertions, 6 deletions
diff --git a/index.php b/index.php
index b4c87ad..004716e 100644
--- a/index.php
+++ b/index.php
@@ -54,17 +54,11 @@ try {
else if(preg_match('@^feedback$@', $route, $m))
{
- if(!has('FEEDBACK'))
- return include('view/404.php');
-
include('view/feedback.php');
}
else if(preg_match('@^feedback/read$@', $route, $m))
{
- if(!has('FEEDBACK'))
- return include('view/404.php');
-
include('view/feedback-read.php');
}
diff --git a/view/feedback.php b/view/feedback.php
index 73b0241..f603dbf 100644
--- a/view/feedback.php
+++ b/view/feedback.php
@@ -1,6 +1,9 @@
<?php
$feedback = new Feedback();
+if(!$feedback->isEnabled())
+ throw new NotFoundException('Feedback is disabled');
+
$info = $_POST;
if(!$feedback->validate($info)) {