diff options
| author | Michael Save <savetheinternet@tinyboard.org> | 2012-02-14 23:18:00 +1100 |
|---|---|---|
| committer | Michael Save <savetheinternet@tinyboard.org> | 2012-02-14 23:18:00 +1100 |
| commit | a431994016e0293112a8e3b40832eeec09dafbdf (patch) | |
| tree | e8fb61c4809b7c35274de49fac1335c7ab777707 | |
| parent | bc78a6b28a6414304b1c35928d5653bd9b06680e (diff) | |
fixed bug causing "bot" errors when disabling fields on certain boards only
| -rw-r--r-- | post.php | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -151,14 +151,20 @@ if($config['field_disable_password']) $_POST['password'] = ''; - if( !isset($_POST['name']) || - !isset($_POST['email']) || - !isset($_POST['subject']) || + if( !isset($_POST['subject']) || !isset($_POST['body']) || - !isset($_POST['board']) || - !isset($_POST['password']) + !isset($_POST['board']) ) error($config['error']['bot']); + if(!isset($_POST['name'])) + $_POST['name'] = $config['anonymous']; + + if(!isset($_POST['email'])) + $_POST['email'] = ''; + + if(!isset($_POST['password'])) + $_POST['password'] = ''; + $post = Array('board' => $_POST['board']); if(isset($_POST['thread'])) { |
