aboutsummaryrefslogtreecommitdiff
path: root/model/Feedback.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--model/Feedback.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/model/Feedback.php b/model/Feedback.php
index 16791eb..d2846ad 100644
--- a/model/Feedback.php
+++ b/model/Feedback.php
@@ -35,6 +35,8 @@ class Feedback
VALUES (:reported, :datetime, :net, :os, :player, :stream, :ipproto_v4, :ipproto_v6, :provider, :issues, :issuetext)
');
+ $issuetext = preg_replace('/\r?\n/', ' ', $info['issuetext']);
+
$stm->execute(array(
'reported' => time(),
'datetime' => strtotime($info['datetime']),
@@ -46,13 +48,12 @@ class Feedback
'ipproto_v6' => isset($info['ipproto']) && is_array($info['ipproto']) && in_array('v6', $info['ipproto']),
'provider' => $info['provider'],
'issues' => isset($info['issues']) && is_array($info['issues']) ? implode(',', $info['issues']) : '',
- 'issuetext' => $info['issuetext'],
+ 'issuetext' => $issuetext,
));
}
public function isLoggedIn()
{
- return true;
return
isset($_SERVER['PHP_AUTH_USER']) &&
$_SERVER['PHP_AUTH_USER'] == $this->getConference()->get('FEEDBACK.USERNAME') &&
@@ -76,6 +77,7 @@ class Feedback
SELECT *
FROM feedback
WHERE reported BETWEEN :from AND :to
+ ORDER BY reported DESC
');
$stm->setFetchMode(PDO::FETCH_ASSOC);