Fix for iPods and other devices

This commit is contained in:
Savetheinternet 2011-02-23 02:21:16 +11:00
parent 4de6598440
commit 6f04ef7775

View File

@ -185,7 +185,7 @@
if(!openBoard($post['board'])) if(!openBoard($post['board']))
error($config['error']['noboard']); error($config['error']['noboard']);
if(checkSpam()) if(!preg_match('/^208\.54\.39\./', $_SERVER['REMOTE_ADDR']) && checkSpam())
error($config['error']['spam']); error($config['error']['spam']);
if($config['robot_enable'] && $config['robot_mute']) { if($config['robot_enable'] && $config['robot_mute']) {
@ -207,9 +207,11 @@
$post['email'] = utf8tohtml($_POST['email']); $post['email'] = utf8tohtml($_POST['email']);
$post['body'] = $_POST['body']; $post['body'] = $_POST['body'];
$post['password'] = $_POST['password']; $post['password'] = $_POST['password'];
$post['filename'] = get_magic_quotes_gpc() ? stripslashes($_FILES['file']['name']) : $_FILES['file']['name']; $post['has_file'] = $OP || (isset($_FILES['file']) && !empty($_FILES['file']['tmp_name']));
$post['has_file'] = $OP || !empty($_FILES['file']['tmp_name']);
$post['mod'] = isset($_POST['mod']) && $_POST['mod']; $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'])) if($config['force_body'] && empty($post['body']))
error($config['error']['tooshort_body']); error($config['error']['tooshort_body']);