From a585e47b6339d0486896fbe869cf959a4c273858 Mon Sep 17 00:00:00 2001 From: robinsowell Date: Mon, 22 May 2023 11:43:41 -0400 Subject: [PATCH] Fixed template links in cp added a changelog --- README.md | 10 ++++++++++ system/user/addons/forum/Controller/Design/Forums.php | 7 ++++--- system/user/addons/forum/addon.setup.php | 2 +- system/user/addons/forum/mod.forum.php | 4 ++-- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 88ac681..0b07b03 100644 --- a/README.md +++ b/README.md @@ -22,3 +22,13 @@ The ExpressionEngine Discussion Forum Module allows you to create and manage a f - [Displaying Recent Forum Topics in non-forum templates](docs/recent-topics.md) - [Associating Channel Entries with Forum Topics](docs/channel-forum.md) - [Other Features](docs/other-features.md) + +## Changelog + +### 5.1.1 + +- Fixed template links in the control panel. + +### 5.0.0 + +- Moved Forum add-on out of core. diff --git a/system/user/addons/forum/Controller/Design/Forums.php b/system/user/addons/forum/Controller/Design/Forums.php index 71c7206..2a8e152 100644 --- a/system/user/addons/forum/Controller/Design/Forums.php +++ b/system/user/addons/forum/Controller/Design/Forums.php @@ -87,9 +87,10 @@ public function index() foreach ($files as $file) { if (strpos($file, '.') !== false) { - $human = str_replace('_', ' ', substr($file, 0, -strlen(strrchr($file, '.')))); - $edit_url = ee('CP/URL')->make('addons/settings/forum/templates/edit/', ['theme' => $theme, 'dir' => $dir, 'file' => $human]); - $human = ucfirst($human); + //$human = str_replace('_', ' ', substr($file, 0, -strlen(strrchr($file, '.')))); + $edit = substr($file, 0, -strlen(strrchr($file, '.'))); + $edit_url = ee('CP/URL')->make('addons/settings/forum/templates/edit/', ['theme' => $theme, 'dir' => $dir, 'file' => $edit]); + $human = ucfirst(str_replace('_', ' ', $edit)); $data[$dir][] = array( array( 'content' => (lang($human) == false) ? $human : lang($human), diff --git a/system/user/addons/forum/addon.setup.php b/system/user/addons/forum/addon.setup.php index 47c73f4..fda5115 100644 --- a/system/user/addons/forum/addon.setup.php +++ b/system/user/addons/forum/addon.setup.php @@ -5,7 +5,7 @@ 'author_url' => 'https://expressionengine.com/', 'name' => 'Forum', 'description' => 'Add a full-featured forum to your site', - 'version' => '5.1.0', + 'version' => '5.1.1', 'namespace' => 'ExpressionEngine\Addons\Forum', 'settings_exist' => true, diff --git a/system/user/addons/forum/mod.forum.php b/system/user/addons/forum/mod.forum.php index acd7d4b..e4593b5 100644 --- a/system/user/addons/forum/mod.forum.php +++ b/system/user/addons/forum/mod.forum.php @@ -13,8 +13,8 @@ */ class Forum { - public $version = '5.1.0'; - public $build = '20220729'; + public $version = '5.1.1'; + public $build = '20230522'; public $use_site_profile = false; public $search_limit = 250; // Maximum number of search results (x2 since it can include this number of topics + this number of posts) public $return_data = '';