diff --git a/CHANGELOG.md b/CHANGELOG.md
index cc262ed05..806bae37d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,7 +13,7 @@
- Some enhancements [\#1445](https://github.com/torrentpier/torrentpier/pull/1445) ([belomaxorka](https://github.com/belomaxorka))
- Guests can view polls [\#1464](https://github.com/torrentpier/torrentpier/pull/1464) ([belomaxorka](https://github.com/belomaxorka))
- Improved app debug [\#1438](https://github.com/torrentpier/torrentpier/pull/1438) ([belomaxorka](https://github.com/belomaxorka))
-- Some enhancements for flags [\#1470](https://github.com/torrentpier/torrentpier/pull/1470) ([belomaxorka](https://github.com/belomaxorka))
+- Some enhancements for flags [\#1470](https://github.com/torrentpier/torrentpier/pull/1470), [\#1471](https://github.com/torrentpier/torrentpier/pull/1471) ([belomaxorka](https://github.com/belomaxorka))
- Fixed quote selection for smiles [\#1457](https://github.com/torrentpier/torrentpier/pull/1457) ([belomaxorka](https://github.com/belomaxorka))
- Demo mode: Allow registering torrents by default [\#1440](https://github.com/torrentpier/torrentpier/pull/1440) ([belomaxorka](https://github.com/belomaxorka))
- Temp: Removed showing forum description in `viewforum.php` [\#1465](https://github.com/torrentpier/torrentpier/pull/1465) ([belomaxorka](https://github.com/belomaxorka))
diff --git a/library/includes/functions.php b/library/includes/functions.php
index 3bc9a907f..b5c2b2c81 100644
--- a/library/includes/functions.php
+++ b/library/includes/functions.php
@@ -1186,9 +1186,10 @@ function get_user_torrent_client(string $peer_id): string
* Returns country flag by country code
*
* @param string $code
+ * @param bool $showName
* @return string
*/
-function render_flag(string $code): string
+function render_flag(string $code, bool $showName = true): string
{
global $lang;
static $iconExtension = '.svg';
@@ -1199,7 +1200,8 @@ function render_flag(string $code): string
} else {
$flagIconPath = BB_ROOT . 'styles/images/flags/' . $code . $iconExtension;
if (is_file($flagIconPath)) {
- return '
';
+ $countryName = $showName ? str_short($lang['COUNTRIES'][$code], 20) : '';
+ return '
' . $countryName;
}
}
}
diff --git a/viewtopic.php b/viewtopic.php
index 77505b427..26c819cb8 100644
--- a/viewtopic.php
+++ b/viewtopic.php
@@ -673,7 +673,7 @@ for ($i = 0; $i < $total_posts; $i++) {
'POSTER_JOINED_DATE' => $poster_joined,
'POSTER_POSTS' => ($bb_cfg['show_poster_posts'] && $poster_posts) ? '' . $poster_posts . '' : '',
- 'POSTER_FROM' => $bb_cfg['show_poster_from'] ? render_flag($poster_from) : '',
+ 'POSTER_FROM' => $bb_cfg['show_poster_from'] ? render_flag($poster_from, false) : '',
'POSTER_BOT' => $poster_bot,
'POSTER_GUEST' => $poster_guest,
'POSTER_ID' => $poster_id,