From 144693a488a94979005710943b60316e924bf305 Mon Sep 17 00:00:00 2001 From: AndreaChirulescu Date: Sun, 18 Apr 2021 20:33:56 +0200 Subject: Added NN country for defaulting bands to an unknown country --- includes/admin/register_db_tables.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/admin/register_db_tables.php b/includes/admin/register_db_tables.php index 1121253..3e26a15 100644 --- a/includes/admin/register_db_tables.php +++ b/includes/admin/register_db_tables.php @@ -419,7 +419,12 @@ if ( !function_exists( "giglog_register_db_tables") ) `wpgcl_createddate` date NOT NULL DEFAULT current_timestamp();"); } - update_option("giglogadmin_db_version", 3); + if ($db_version == NULL || $db_version < 4) + { + $wpdb->query( + "INSERT INTO `wpg_countries` (`id`, `wpgc_fullname`, `wpgcountry_name`, `wpgc_iso3`, `wpgc_numcode`) VALUES ('NN', 'UNKNOWN', 'Unknown', 'NNN', '666');"); + } + update_option("giglogadmin_db_version", 4); } giglog_register_db_tables(); -- cgit v1.2.3