Compare commits

...

2 Commits

Author SHA1 Message Date
valentina 241583769e Fix minore 2024-06-12 16:02:55 +02:00
pek5892 77526c63ce Fix installazione plugins 2024-06-12 12:27:03 +02:00
2 changed files with 53 additions and 20 deletions

View File

@ -144,11 +144,15 @@ if (file_exists($extraction_dir.'/VERSION')) {
copyr(dirname($file->getRealPath()), base_dir().'/'.$directory.'/'.$info['directory']);
// Eventuale registrazione nel database
if (basename($file->getRealPath()) == 'PLUGIN') {
if (empty($installed)) {
$dbo->insert($table, array_merge($insert, [
'directory' => $info['directory'],
'name' => $info['name'],
'options' => $info['options'],
'idmodule_from' => $insert['idmodule_from'],
'idmodule_to' => $insert['idmodule_to'],
'position' => $insert['position'],
'version' => $info['version'],
'compatibility' => $info['compatibility'],
'order' => 100,
@ -163,8 +167,37 @@ if (file_exists($extraction_dir.'/VERSION')) {
]));
flash()->error(tr('Installazione completata!'));
} else {
flash()->error(tr('Aggiornamento completato!'));
}
} else {
if (empty($installed)) {
$dbo->insert($table, array_merge($insert, [
'directory' => $info['directory'],
'name' => $info['name'],
'options' => $info['options'],
'version' => $info['version'],
'compatibility' => $info['compatibility'],
'id_module' => $insert['id_module'],
'is_record' => $insert['is_record'],
'icon' => $insert['icon'],
'filename' => $insert_lang['filename'],
'order' => 100,
'default' => 0,
'enabled' => 1,
]));
$id_record = $dbo->lastInsertedID();
$dbo->insert($table.'_lang', array_merge($insert_lang, [
'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!'));
}
}
}
}

View File

@ -58,7 +58,7 @@ echo '
echo '
<h4>'.tr('Account mittente').'</h4>
<div class="well">
'.$mail->template->account->from_name.' &lt;'.$mail->template->account->from_address.'&gt; - '.Modules::link('Account email', $mail->template->account->id, $mail->template->account->getTranslation('title')).'
'.$mail->template->account->from_name.' &lt;'.$mail->template->account->from_address.'&gt; - '.Modules::link('Account email', $mail->template->account->id, $mail->template->account->name).'
</div>';
echo '