From 4fbea5a16d55ec42642e97b638f8f016bf2a5c2b Mon Sep 17 00:00:00 2001
From: MightyMCoder <130976036+MightyMCoder@users.noreply.github.com>
Date: Sat, 18 Jan 2025 23:42:01 +0100
Subject: [PATCH 1/4] remove unused function parameter
---
items/items_delete.php | 2 +-
items/items_edit_new.php | 2 +-
items/items_history.php | 2 +-
preferences/preferences_function.php | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/items/items_delete.php b/items/items_delete.php
index 2b1471a..b72956d 100644
--- a/items/items_delete.php
+++ b/items/items_delete.php
@@ -107,7 +107,7 @@ function displayItemDeleteForm($items, $user, $getItemId, $getItemFormer) {
$form->addCustomContent('', '
'.$gL10n->get('PLG_INVENTORY_MANAGER_ITEM_MAKE_TO_FORMER'));
}
- $page->addHtml($form->show(false));
+ $page->addHtml($form->show());
$page->show();
}
diff --git a/items/items_edit_new.php b/items/items_edit_new.php
index bfa4c7e..edb22ab 100644
--- a/items/items_edit_new.php
+++ b/items/items_edit_new.php
@@ -434,5 +434,5 @@ function isSelect2Empty(selectId) {
(int) $infoItem->getValue('imi_usr_id_change'), $infoItem->getValue('imi_timestamp_change')
));
-$page->addHtml($form->show(false));
+$page->addHtml($form->show());
$page->show();
\ No newline at end of file
diff --git a/items/items_history.php b/items/items_history.php
index 32a5555..367531f 100644
--- a/items/items_history.php
+++ b/items/items_history.php
@@ -91,7 +91,7 @@
$form->addInput('filter_date_to', $gL10n->get('SYS_END'), $dateToHtml, array('type' => 'date', 'maxLength' => 10));
$form->addInput('item_id', '', $getItemId, array('property' => HtmlForm::FIELD_HIDDEN));
$form->addSubmitButton('btn_send', $gL10n->get('SYS_OK'));
-$FilterNavbar->addForm($form->show(false));
+$FilterNavbar->addForm($form->show());
$page->addHtml($FilterNavbar->show());
$table = new HtmlTable('profile_field_history_table', $page, true, true);
diff --git a/preferences/preferences_function.php b/preferences/preferences_function.php
index ad558b5..7542d18 100644
--- a/preferences/preferences_function.php
+++ b/preferences/preferences_function.php
@@ -124,7 +124,7 @@ function showDeinstallationDialog() {
$form->addSubmitButton('btn_deinstall', $gL10n->get('PLG_INVENTORY_MANAGER_DEINSTALLATION'), array('icon' => 'fa-trash-alt', 'class' => 'offset-sm-3'));
// add form to html page and show page
- $page->addHtml($form->show(false));
+ $page->addHtml($form->show());
$page->show();
}
From 3040a047ed76b40a373d89ae67b841938ebd5f96 Mon Sep 17 00:00:00 2001
From: MightyMCoder <130976036+MightyMCoder@users.noreply.github.com>
Date: Sat, 18 Jan 2025 23:42:41 +0100
Subject: [PATCH 2/4] remove unused function parameter
---
fields/fields_edit_new.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fields/fields_edit_new.php b/fields/fields_edit_new.php
index aaa3eba..9a3cbe1 100644
--- a/fields/fields_edit_new.php
+++ b/fields/fields_edit_new.php
@@ -144,5 +144,5 @@ function setValueList() {
));
// add form to html page and show page
-$page->addHtml($form->show(false));
+$page->addHtml($form->show());
$page->show();
From 3bd5aec125f9ce08d70ddd181fb2744ede05e8fa Mon Sep 17 00:00:00 2001
From: MightyMCoder <130976036+MightyMCoder@users.noreply.github.com>
Date: Sat, 18 Jan 2025 23:54:20 +0100
Subject: [PATCH 3/4] remove disabled mandatory checkbox for system fields
---
fields/fields_edit_new.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fields/fields_edit_new.php b/fields/fields_edit_new.php
index 9a3cbe1..eb40fc9 100644
--- a/fields/fields_edit_new.php
+++ b/fields/fields_edit_new.php
@@ -125,7 +125,7 @@ function setValueList() {
);
$form->addCheckbox('imf_mandatory', $gL10n->get('SYS_REQUIRED_INPUT'), (bool)$itemField->getValue('imf_mandatory'), array(
- 'property' => $itemField->getValue('imf_system') == 1 ? HtmlForm::FIELD_DISABLED : HtmlForm::FIELD_DEFAULT,
+ 'property' => HtmlForm::FIELD_DEFAULT,
'icon' => 'fa-asterisk'
)
);
From 9b9045081c813ed5b00f462bf2a3c84a19f63bd7 Mon Sep 17 00:00:00 2001
From: MightyMCoder <130976036+MightyMCoder@users.noreply.github.com>
Date: Sat, 18 Jan 2025 23:54:49 +0100
Subject: [PATCH 4/4] bugfix: $_SESSION not defined
---
import/import_column_config.php | 51 ++++++++++++++++-----------------
import/import_items.php | 8 ++++--
import/import_read_file.php | 7 -----
3 files changed, 29 insertions(+), 37 deletions(-)
diff --git a/import/import_column_config.php b/import/import_column_config.php
index 4b21041..1305caf 100644
--- a/import/import_column_config.php
+++ b/import/import_column_config.php
@@ -91,15 +91,12 @@ function getColumnAssignmentHtml(array $arrayColumnList, array $arrayCsvColumns)
return $html;
}
-$items = new CItems($gDb, $gCurrentOrgId);
-$items->readItems($gCurrentOrgId);
-
// create html page object
$page = new HtmlPage('admidio-items-import-csv', $headline);
$page->addHtml('
'.$gL10n->get('PLG_INVENTORY_MANAGER_IMPORT_ASSIGN_FIELDS').'
'); // show form -$form = new HtmlForm('import_assign_fields_form', ADMIDIO_URL . FOLDER_PLUGINS . PLUGIN_FOLDER_IM . '/import/import_items.php', $page, array('type' => 'vertical')); +$form = new HtmlForm('import_assign_fields_form', SecurityUtils::encodeUrl(ADMIDIO_URL . FOLDER_PLUGINS . PLUGIN_FOLDER_IM . '/import/import_items.php'), $page, array('type' => 'vertical')); $form->addCheckbox('first_row', $gL10n->get('SYS_FIRST_LINE_COLUMN_NAME'), $formValues['first_row']); $form->addHtml('