From 5e227a5f652942a8564e5bac34cd7e63db195690 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Wed, 17 Jan 2018 13:53:57 +0100 Subject: [PATCH] Update Country class --- Changelog | 1 + nntmux/utility/Country.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 01cd6279f..8b87f6b39 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2018-01-17 DariusIII + * Chg: Update Country class * Chg: Remove countries table as we will use new package with migration and seeding to populate it * Chg: Update Country.php * Chg: Remove $maxage parameter as it is not used in Books class diff --git a/nntmux/utility/Country.php b/nntmux/utility/Country.php index 02778ea30..63ab72b29 100755 --- a/nntmux/utility/Country.php +++ b/nntmux/utility/Country.php @@ -39,7 +39,7 @@ class Country public static function countryCode($country) { if (\strlen($country) > 2) { - $code = CountryModel::query()->where('full_name', $country)->first(['iso_3166_2']); + $code = CountryModel::query()->where('full_name', $country)->orWhere('name', $country)->first(['iso_3166_2']); if ($code !== null && isset($code['iso_3166_2'])) { return $code['iso_3166_2']; }