diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d29ceb..56fe696 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +### 4.3.3 - 12 November 2023 +- ![New Feature](https://smftricks.com/assets/changelog/tag--plus.png) Pre-select filtered prefixes when posting a new poll in boards. + ### 4.3.2 - 05 July 2023 - ![Bug Fix](https://smftricks.com/assets/changelog/bug--minus.png) Fixed modifying 'New Topic' url when it's not set. diff --git a/Sources/PostPrefix/Integration/MessageIndex.php b/Sources/PostPrefix/Integration/MessageIndex.php index a831e5e..8223355 100644 --- a/Sources/PostPrefix/Integration/MessageIndex.php +++ b/Sources/PostPrefix/Integration/MessageIndex.php @@ -236,6 +236,10 @@ public function topics_prefixes() : void if (isset($_REQUEST['prefix']) && !empty($_REQUEST['prefix']) && $context['can_post_new']) $context['normal_buttons']['new_topic']['url'] .= ';prefix=' . $_REQUEST['prefix']; + // Do the same for polls + if (isset($_REQUEST['prefix']) && !empty($_REQUEST['prefix']) && $context['can_post_poll']) + $context['normal_buttons']['post_poll']['url'] .= ';prefix=' . $_REQUEST['prefix']; + // Okay, search the prefixes if (($context['prefixes']['filter'] = cache_get_data('prefix_filter_b' . $board, 3600)) === null) { diff --git a/package-info.xml b/package-info.xml index 1b3043f..398beff 100644 --- a/package-info.xml +++ b/package-info.xml @@ -3,7 +3,7 @@ smftricks:postprefix SMF Post Prefix - 4.3.2 + 4.3.3 modification