summaryrefslogtreecommitdiff
path: root/inc/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/functions.php')
-rwxr-xr-xinc/functions.php8
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 {