feat(show post bbcode): Added 'only_for_first_post' param (#1830)

* feat(show post bbcode): Added `'only_for_first_post'` param

* Update config.php
This commit is contained in:
Roman Kelesidis 2025-03-02 14:48:02 +07:00 committed by GitHub
commit 4dcd1fb16e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 10 additions and 10 deletions

View file

@ -15,7 +15,7 @@ global $user, $lang, $bb_cfg;
$post_id = isset($this->request['post_id']) ? (int)$this->request['post_id'] : null;
$topic_id = isset($this->request['topic_id']) ? (int)$this->request['topic_id'] : null;
$return_text = $bb_cfg['show_post_bbcode_button'] && isset($this->request['return_text']) && (bool)$this->request['return_text'];
$return_text = $bb_cfg['show_post_bbcode_button']['enabled'] && isset($this->request['return_text']) && (bool)$this->request['return_text'];
if (is_null($post_id)) {
$post_id = DB()->fetch_row("SELECT topic_first_post_id FROM " . BB_TOPICS . " WHERE topic_id = $topic_id", 'topic_first_post_id');