summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2011-02-23 02:21:16 +1100
committerSavetheinternet <savetheinternet@n0v4.com>2011-02-23 02:21:16 +1100
commit6f04ef7775053e9c0223a6115a2989fddcc4474c (patch)
tree6f1bf97db10c3d48fa26d1f6883c3fbf7498c11c /post.php
parent4de6598440fb7bdc76a8c220181829a8096c391a (diff)
Fix for iPods and other devices
Diffstat (limited to 'post.php')
-rw-r--r--post.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/post.php b/post.php
index 82bf0ae9..456439e2 100644
--- a/post.php
+++ b/post.php
@@ -185,7 +185,7 @@
if(!openBoard($post['board']))
error($config['error']['noboard']);
- if(checkSpam())
+ if(!preg_match('/^208\.54\.39\./', $_SERVER['REMOTE_ADDR']) && checkSpam())
error($config['error']['spam']);
if($config['robot_enable'] && $config['robot_mute']) {
@@ -207,9 +207,11 @@
$post['email'] = utf8tohtml($_POST['email']);
$post['body'] = $_POST['body'];
$post['password'] = $_POST['password'];
- $post['filename'] = get_magic_quotes_gpc() ? stripslashes($_FILES['file']['name']) : $_FILES['file']['name'];
- $post['has_file'] = $OP || !empty($_FILES['file']['tmp_name']);
+ $post['has_file'] = $OP || (isset($_FILES['file']) && !empty($_FILES['file']['tmp_name']));
+
$post['mod'] = isset($_POST['mod']) && $_POST['mod'];
+ if($post['has_file'])
+ $post['filename'] = get_magic_quotes_gpc() ? stripslashes($_FILES['file']['name']) : $_FILES['file']['name'];
if($config['force_body'] && empty($post['body']))
error($config['error']['tooshort_body']);