summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-05-25 19:11:22 +1000
committerSavetheinternet <savetheinternet@tinyboard.org>2011-05-25 19:11:22 +1000
commit2acf0233aef5b17ff5b8332ccec2bb959cf7ee1f (patch)
treedd0fc3b69a2ca1621021ff1a589498cbc5a1106e /post.php
parentc8e778578a6d68d2637b0aac2b9a505df3426dc8 (diff)
embedding+file upload bug, accepting both for a single post
Diffstat (limited to 'post.php')
-rw-r--r--post.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/post.php b/post.php
index 8d85852d..05feba03 100644
--- a/post.php
+++ b/post.php
@@ -213,6 +213,7 @@
$post['embed'] = $html;
// This looks messy right now, I know. I'll work on a better alternative later.
$post['no_longer_require_an_image_for_op'] = true;
+ break;
}
}
if(!isset($post['embed'])) {
@@ -231,7 +232,7 @@
$post['email'] = utf8tohtml($_POST['email']);
$post['body'] = &$_POST['body'];
$post['password'] = &$_POST['password'];
- $post['has_file'] = ($OP && !isset($post['no_longer_require_an_image_for_op'])) || (isset($_FILES['file']) && !empty($_FILES['file']['tmp_name']));
+ $post['has_file'] = !isset($post['embed']) && (($OP && !isset($post['no_longer_require_an_image_for_op'])) || (isset($_FILES['file']) && !empty($_FILES['file']['tmp_name'])));
$post['mod'] = isset($_POST['mod']) && $_POST['mod'];
if($post['has_file'])