diff --git a/boards.php b/boards.php index f38c0185..ce6ac945 100644 --- a/boards.php +++ b/boards.php @@ -2,6 +2,8 @@ include "inc/functions.php"; include "inc/mod/auth.php"; +include "inc/countries.php"; + $admin = isset($mod["type"]) && $mod["type"]<=30; if (php_sapi_name() == 'fpm-fcgi' && !$admin) { @@ -60,9 +62,10 @@ foreach ($boards as $i => &$board) { $locale_arr = explode('_', $locale); $locale_short = isset($locale_arr[1]) ? strtolower($locale_arr[1]) : strtolower($locale_arr[0]); $locale_short = str_replace('.utf-8', '', $locale_short); - if ($board['uri'] === 'int') {$locale_short = 'eo'; $locale = 'eo';} + $country = get_country($locale_short); + if ($board['uri'] === 'int') {$locale_short = 'eo'; $locale = 'eo'; $country = 'Esperanto';} - $board['img'] = "\"$locale\""; + $board['img'] = "\"$country\""; if ($showboard || $admin) { if (!$showboard) { diff --git a/inc/countries.php b/inc/countries.php new file mode 100644 index 00000000..e9e0fd60 --- /dev/null +++ b/inc/countries.php @@ -0,0 +1,29 @@ +