mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
Updated
This commit is contained in:
parent
df86028072
commit
d0f4447123
2 changed files with 5 additions and 2 deletions
|
@ -928,6 +928,7 @@ CREATE TABLE IF NOT EXISTS `bb_posts`
|
|||
`post_edit_time` INT(11) NOT NULL DEFAULT '0',
|
||||
`post_edit_count` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`post_attachment` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`post_pinned` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`user_post` TINYINT(1) NOT NULL DEFAULT '1',
|
||||
`mc_comment` TEXT NOT NULL DEFAULT '',
|
||||
`mc_type` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
|
@ -945,7 +946,7 @@ CREATE TABLE IF NOT EXISTS `bb_posts`
|
|||
-- Records of bb_posts
|
||||
-- ----------------------------
|
||||
INSERT INTO `bb_posts`
|
||||
VALUES ('1', '1', '1', '2', UNIX_TIMESTAMP(), '0', '0', '0', '', '0', '0', '0', '1', '', '0', '0');
|
||||
VALUES ('1', '1', '1', '2', UNIX_TIMESTAMP(), '0', '0', '0', '', '0', '0', '0', '0', '1', '', '0', '0');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `bb_posts_html`
|
||||
|
|
|
@ -65,9 +65,11 @@ switch ($this->request['type']) {
|
|||
}
|
||||
break;
|
||||
|
||||
case 'unpin':
|
||||
case 'pin':
|
||||
if ($post['post_id'] != $post['topic_first_post_id'] && (($userdata['user_id'] == $post['poster_id']) || $is_auth['auth_mod'])) {
|
||||
|
||||
$action = $this->request['type'] == 'unpin' ? 0 : 1;
|
||||
DB()->query("UPDATE " . BB_POSTS . " SET post_pinned = $action WHERE post_id = $post_id LIMIT 1");
|
||||
} else {
|
||||
// TODO
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue