From 319ffb64cd1de12a3cdb07116b91c1fa3e0bd6db Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Tue, 16 Jun 2020 14:48:11 +0200 Subject: [PATCH] Fix plugin installation --- plugin/buycourses/database.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugin/buycourses/database.php b/plugin/buycourses/database.php index 057286d044..665ea8285a 100644 --- a/plugin/buycourses/database.php +++ b/plugin/buycourses/database.php @@ -718,6 +718,19 @@ $currencies = [ ]; foreach ($currencies as $currency) { + $value = Database::select( + "*", + $currencyTable, + [ + 'where' => ['country_code = ?' => $currency[0]], + ], + 'first' + ); + + if (!empty($value)) { + continue; + } + Database::insert( $currencyTable, [