Skip to content

Commit db176b6

Browse files
Fix modifying url when it's not set
Signed-off-by: Diego Andrés <diegoandres_cortes@outlook.com>
1 parent a69b8fa commit db176b6

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
### 4.3.2 - 05 July 2023
4+
- ![Bug Fix](https://smftricks.com/assets/changelog/bug--minus.png) Fixed modifying 'New Topic' url when it's not set.
5+
36
### 4.3.1 - 02 June 2023
47
- ![Translation](https://smftricks.com/assets/changelog/language.png) Italian translation provided by [Darknico](https://www.simplemachines.org/community/index.php?action=profile;u=29200)
58
- ![Translation](https://smftricks.com/assets/changelog/language.png) Updated translations.

Sources/PostPrefix/Integration/MessageIndex.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public function topics_prefixes() : void
233233
return;
234234

235235
// If there's a prefix filtered, pre-select it for a new topic.
236-
if (isset($_REQUEST['prefix']) && !empty($_REQUEST['prefix']))
236+
if (isset($_REQUEST['prefix']) && !empty($_REQUEST['prefix']) && $context['can_post_new'])
237237
$context['normal_buttons']['new_topic']['url'] .= ';prefix=' . $_REQUEST['prefix'];
238238

239239
// Okay, search the prefixes

package-info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
44
<id>smftricks:postprefix</id>
55
<name>SMF Post Prefix</name>
6-
<version>4.3.1</version>
6+
<version>4.3.2</version>
77
<type>modification</type>
88
<install for="2.1 - 2.1.99">
99
<!-- Throw error if PHP version too old -->

0 commit comments

Comments
 (0)