From 783fd1a9c641977b54b6d4f96036337a4be6250c Mon Sep 17 00:00:00 2001 From: Pek5892 Date: Fri, 5 Apr 2024 14:32:29 +0200 Subject: [PATCH] Fix upload moduli --- modules/aggiornamenti/upload_modules.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/aggiornamenti/upload_modules.php b/modules/aggiornamenti/upload_modules.php index 5fc2b34e4..408a608bf 100755 --- a/modules/aggiornamenti/upload_modules.php +++ b/modules/aggiornamenti/upload_modules.php @@ -54,7 +54,7 @@ if (file_exists($extraction_dir.'/VERSION')) { ->ignoreVCS(true) ->in($extraction_dir); - $files_module = $finder->getTranslation('name')('MODULE'); + $files_module = $finder->name('MODULE'); foreach ($files_module as $file) { // Informazioni dal file di configurazione @@ -69,8 +69,6 @@ if (file_exists($extraction_dir.'/VERSION')) { $table = 'zz_modules'; $installed = Module::find((new Module())->getByField('name', $info['name'])); - $insert['parent'] = (new Module())->getByField('name', $info['parent']); - $insert['icon'] = $info['icon']; } // Copia dei file nella cartella relativa @@ -86,6 +84,8 @@ if (file_exists($extraction_dir.'/VERSION')) { 'order' => 100, 'default' => 0, 'enabled' => 1, + 'icon' => $info['icon'], + 'parent' => (new Module())->getByField('name', $info['parent']), ])); $id_record = $dbo->lastInsertedID(); $dbo->insert($table.'_lang', array_merge($insert, [ @@ -107,7 +107,7 @@ if (file_exists($extraction_dir.'/VERSION')) { ->ignoreVCS(true) ->in($extraction_dir); - $files_plugin_template = $finder->getTranslation('name')('PLUGIN')->getTranslation('name')('TEMPLATES'); + $files_plugin_template = $finder->name('PLUGIN')->name('TEMPLATES'); foreach ($files_plugin_template as $file) { // Informazioni dal file di configurazione