diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2011-01-02 22:25:17 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2011-01-02 22:25:17 +1100 |
| commit | 5c094429d7fdcd6dbac4d1d9ff3d7cb190ad2b53 (patch) | |
| tree | 8b1a80865b580b6643d6d611af12bd3afbc7d808 /inc | |
| parent | 69956021fc50d904d4050378543524a3e2e0b4e0 (diff) | |
Locks
Diffstat (limited to 'inc')
| -rw-r--r-- | inc/functions.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/inc/functions.php b/inc/functions.php index bdb8298c..57980283 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -133,7 +133,7 @@ function post($post, $OP) { global $pdo, $board; - $query = prepare(sprintf("INSERT INTO `posts_%s` VALUES ( NULL, :thread, :subject, :email, :name, :trip, :body, :time, :time, :thumb, :thumbwidth, :thumbheight, :file, :width, :height, :filesize, :filename, :filehash, :password, :ip, :sticky)", $board['uri'])); + $query = prepare(sprintf("INSERT INTO `posts_%s` VALUES ( NULL, :thread, :subject, :email, :name, :trip, :body, :time, :time, :thumb, :thumbwidth, :thumbheight, :file, :width, :height, :filesize, :filename, :filehash, :password, :ip, :sticky, :locked)", $board['uri'])); // Basic stuff $query->bindValue(':subject', $post['subject']); @@ -151,6 +151,12 @@ $query->bindValue(':sticky', 0, PDO::PARAM_INT); } + if($post['mod'] && $post['locked']) { + $query->bindValue(':locked', 1, PDO::PARAM_INT); + } else { + $query->bindValue(':locked', 0, PDO::PARAM_INT); + } + if($OP) { // No parent thread, image $query->bindValue(':thread', null, PDO::PARAM_NULL); |
