summaryrefslogtreecommitdiff
path: root/htdocs/new-post.php
diff options
context:
space:
mode:
Diffstat (limited to 'htdocs/new-post.php')
-rw-r--r--htdocs/new-post.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/htdocs/new-post.php b/htdocs/new-post.php
index 7312e5f..0d1556c 100644
--- a/htdocs/new-post.php
+++ b/htdocs/new-post.php
@@ -31,7 +31,7 @@ if (isset($_POST['category'])) {
$error .= "<p>$desc is a required field.</p>";
} else {
- $values[$field] = addslashes($_POST[$field]);
+ $values[$field] = trim($_POST[$field]);
}
}
@@ -44,9 +44,11 @@ if (isset($_POST['category'])) {
$post->setEmail($values['email']);
$post->setCategory($values['category']);
- $post->setTitle($values['title']);
+ $post->setName($values['title']);
$post->setDescription($values['description']);
+ // TODO: Set the source of the post.
+
if ($post->save()) {
$post->sendValidation();