Skip to content

Commit 5dd9f8a

Browse files
v4.0.5
Signed-off-by: Diego Andrés <diegoandres_cortes@outlook.com>
1 parent 707b1fa commit 5dd9f8a

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

CHANGELOG.md

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

3+
#### 4.0.5 - 20 June 2022
4+
- ![Improvement](https://smftricks.com/assets/changelog/tag--pencil.png) Remove 'redirect' boards from the list when editing/adding.
5+
- ![Improvement](https://smftricks.com/assets/changelog/tag--pencil.png) Clear cache when saving/editing prefixes.
6+
37
#### 4.0.4 - 25 April 2022
48
- ![Bug Fix](https://smftricks.com/assets/changelog/bug--minus.png) Fixed incorrectly adding/replacing the topic subject.
59
- ![Translation](https://smftricks.com/assets/changelog/language.png) French translation provided by [Dreadaxe](https://www.simplemachines.org/community/index.php?action=profile;u=147069)

Sources/PostPrefix/Admin/Manage.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Manage
2626
/**
2727
* @var array Board columns
2828
*/
29-
private $_boards_columns = ['b.id_board', 'b.board_order', 'b.id_cat', 'b.name', 'b.child_level'];
29+
private $_boards_columns = ['b.id_board', 'b.board_order', 'b.id_cat', 'b.name', 'b.child_level', 'b.redirect'];
3030

3131
/**
3232
* @var array Group columns
@@ -291,7 +291,13 @@ public function set_prefix() : void
291291
$context['forum_groups'] = $this->forumGroups();
292292

293293
// Boards
294-
$context['forum_categories'] = Database::bNested('b.board_order', 'boards AS b', $this->_cats_columns, $this->_boards_columns, 'boards', '', 'LEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)');
294+
$context['forum_categories'] = Database::bNested('b.board_order', 'boards AS b', $this->_cats_columns, $this->_boards_columns, 'boards',
295+
'WHERE b.redirect = {string:redirect}',
296+
'LEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)',
297+
[
298+
'redirect' => '',
299+
]
300+
);
295301

296302
// Now let's sort the list of categories into the boards for the template
297303
foreach ($context['forum_categories'] as $category)

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.0.4</version>
6+
<version>4.0.5</version>
77
<type>modification</type>
88
<install for="2.1 - 2.1.99">
99
<!-- Mod Readme -->

0 commit comments

Comments
 (0)