From 00baaa0788908d879f12af0039d6868a4364c1aa Mon Sep 17 00:00:00 2001 From: Pek5892 Date: Fri, 5 Apr 2024 16:07:27 +0200 Subject: [PATCH] Fix upload template --- modules/aggiornamenti/upload_modules.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/aggiornamenti/upload_modules.php b/modules/aggiornamenti/upload_modules.php index 2b3a35ced..f478cd158 100755 --- a/modules/aggiornamenti/upload_modules.php +++ b/modules/aggiornamenti/upload_modules.php @@ -115,6 +115,7 @@ if (file_exists($extraction_dir.'/VERSION')) { // Informazioni aggiuntive per il database $insert = []; + $insert_lang = []; // Plugin if (basename($file->getRealPath()) == 'PLUGIN') { @@ -135,7 +136,7 @@ if (file_exists($extraction_dir.'/VERSION')) { $installed = Prints::getPrints()[$info['name']]; $insert['id_module'] = (new Module())->getByField('name', $info['module']); $insert['is_record'] = $info['is_record']; - $insert['filename'] = $info['filename']; + $insert_lang['filename'] = $info['filename']; $insert['icon'] = $info['icon']; } @@ -154,12 +155,12 @@ if (file_exists($extraction_dir.'/VERSION')) { 'enabled' => 1, ])); $id_record = $dbo->lastInsertedID(); - $dbo->insert($table.'_lang', [ + $dbo->insert($table.'_lang', array_merge($insert_lang, [ 'name' => $info['name'], 'title' => !empty($info['title']) ? $info['title'] : $info['name'], 'id_record' => $id_record, 'id_lang' => Models\Locale::getDefault()->id, - ]); + ])); flash()->error(tr('Installazione completata!')); } else { flash()->error(tr('Aggiornamento completato!'));