diff options
| author | Michael <savetheinternet@tinyboard.org> | 2013-01-18 23:02:24 -0800 |
|---|---|---|
| committer | Michael <savetheinternet@tinyboard.org> | 2013-01-18 23:02:24 -0800 |
| commit | 6aac2472e66f87d2d38a3b0bd361e355836be49d (patch) | |
| tree | 79b0b93d1b11f37cbff9f024e34c28ada39239cc /inc/functions.php | |
| parent | ced540a66ee223ba2e3e2b8dbaaf50e5b48a13d8 (diff) | |
| parent | 3a9ed90c585b0e97cbc3453f5a004c34e630cf00 (diff) | |
Merge pull request #92 from Macil/fixes
Miscellaneous bugfixes
Diffstat (limited to 'inc/functions.php')
| -rw-r--r-- | inc/functions.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/functions.php b/inc/functions.php index a7b6b434..8ce81e25 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -527,7 +527,7 @@ function checkFlood($post) { $query = prepare(sprintf("SELECT * FROM `posts_%s` WHERE (`ip` = :ip AND `time` >= :floodtime) OR (`ip` = :ip AND `body` != '' AND `body` = :body AND `time` >= :floodsameiptime) OR (`body` != '' AND `body` = :body AND `time` >= :floodsametime) LIMIT 1", $board['uri'])); $query->bindValue(':ip', $_SERVER['REMOTE_ADDR']); - $query->bindValue(':body', $post['body'], PDO::PARAM_INT); + $query->bindValue(':body', $post['body']); $query->bindValue(':floodtime', time()-$config['flood_time'], PDO::PARAM_INT); $query->bindValue(':floodsameiptime', time()-$config['flood_time_ip'], PDO::PARAM_INT); $query->bindValue(':floodsametime', time()-$config['flood_time_same'], PDO::PARAM_INT); @@ -697,7 +697,7 @@ function threadExists($id) { function post(array $post) { global $pdo, $board; - $query = prepare(sprintf("INSERT INTO `posts_%s` VALUES ( NULL, :thread, :subject, :email, :name, :trip, :capcode, :body, :body_nomarkup, :time, :time, :thumb, :thumbwidth, :thumbheight, :file, :width, :height, :filesize, :filename, :filehash, :password, :ip, :sticky, :locked, 0, :embed)", $board['uri'])); + $query = prepare(sprintf("INSERT INTO `posts_%s` (`id`, `thread`, `subject`, `email`, `name`, `trip`, `capcode`, `body`, `body_nomarkup`, `time`, `bump`, `thumb`, `thumbwidth`, `thumbheight`, `file`, `filewidth`, `fileheight`, `filesize`, `filename`, `filehash`, `password`, `ip`, `sticky`, `locked`, `sage`, `embed`) VALUES ( NULL, :thread, :subject, :email, :name, :trip, :capcode, :body, :body_nomarkup, :time, :time, :thumb, :thumbwidth, :thumbheight, :file, :width, :height, :filesize, :filename, :filehash, :password, :ip, :sticky, :locked, 0, :embed)", $board['uri'])); // Basic stuff if (!empty($post['subject'])) { |
