diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2011-02-23 02:21:16 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2011-02-23 02:21:16 +1100 |
| commit | 6f04ef7775053e9c0223a6115a2989fddcc4474c (patch) | |
| tree | 6f1bf97db10c3d48fa26d1f6883c3fbf7498c11c | |
| parent | 4de6598440fb7bdc76a8c220181829a8096c391a (diff) | |
Fix for iPods and other devices
| -rw-r--r-- | post.php | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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']); |
