summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-09-29 21:17:59 +1000
committerSavetheinternet <savetheinternet@tinyboard.org>2011-09-29 21:17:59 +1000
commit20c200a7ff977328373c23c4b1cc36ec5d51855b (patch)
treeaa2b0c789b5681734aa9d7f1910ce1e3cf29a975
parent4ec10dc89a1f0ec7ef3cc5447478995bb75e8d71 (diff)
Fixed bug regarding no-body posts (especially relevant to video embedding)
-rw-r--r--post.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/post.php b/post.php
index 1fc09cfe..6d9cc309 100644
--- a/post.php
+++ b/post.php
@@ -243,10 +243,8 @@
$post['mod'] = isset($_POST['mod']) && $_POST['mod'];
if($post['has_file'])
$post['filename'] = utf8tohtml(get_magic_quotes_gpc() ? stripslashes($_FILES['file']['name']) : $_FILES['file']['name']);
- elseif(empty($post['body']))
- error($config['error']['tooshort_body']);
- if($OP && $config['force_body_op'] || !$OP && $config['force_body']) {
+ if(!($post['has_file'] || isset($post['embed'])) || (($OP && $config['force_body_op']) || (!$OP && $config['force_body']))) {
$stripped_whitespace = preg_replace('/[\s]/u', '', $post['body']);
if(empty($stripped_whitespace )) {
error($config['error']['tooshort_body']);