diff options
| author | Fredrick Brennan <admin@8chan.co> | 2015-04-03 14:56:28 +0800 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2016-05-06 16:39:20 +0200 |
| commit | 505adffcdca1c1141b7b46f862b7939f2f4acf45 (patch) | |
| tree | 114147c8a811183561a227cce875140bc4ac364e /inc/functions.php | |
| parent | ab02a4272514410fc053ced9c17a26bc0c8f1cf4 (diff) | |
Cyclical threads ♺
Diffstat (limited to 'inc/functions.php')
| -rwxr-xr-x | inc/functions.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/inc/functions.php b/inc/functions.php index e9692d56..1bd1f32f 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -1021,7 +1021,7 @@ function insertFloodPost(array $post) { 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, :files, :num_files, :filehash, :password, :ip, :sticky, :locked, 0, :embed, :slug)", $board['uri'])); + $query = prepare(sprintf("INSERT INTO ``posts_%s`` VALUES ( NULL, :thread, :subject, :email, :name, :trip, :capcode, :body, :body_nomarkup, :time, :time, :files, :num_files, :filehash, :password, :ip, :sticky, :locked, :cycle, 0, :embed, :slug)", $board['uri'])); // Basic stuff if (!empty($post['subject'])) { @@ -1061,6 +1061,12 @@ function post(array $post) { $query->bindValue(':locked', false, PDO::PARAM_INT); } + if ($post['op'] && $post['mod'] && isset($post['cycle']) && $post['cycle']) { + $query->bindValue(':cycle', true, PDO::PARAM_INT); + } else { + $query->bindValue(':cycle', false, PDO::PARAM_INT); + } + if ($post['mod'] && isset($post['capcode']) && $post['capcode']) { $query->bindValue(':capcode', $post['capcode'], PDO::PARAM_INT); } else { |
