From b2243cd06dfb6aa8d9a8e52765fe6c3163adb9df Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Tue, 26 Sep 2023 18:10:16 +0900 Subject: [PATCH] Add EditOrder dummy template class for edit_order page without this dummy class the Form\Generate cannot load. We don't need it, except for the set page name --- www/lib/CoreLibs/Admin/EditBase.php | 9 +++-- .../Output/Form/TableArrays/EditOrder.php | 40 +++++++++++++++++++ www/vendor/composer/autoload_classmap.php | 1 + www/vendor/composer/autoload_static.php | 1 + 4 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 www/lib/CoreLibs/Output/Form/TableArrays/EditOrder.php diff --git a/www/lib/CoreLibs/Admin/EditBase.php b/www/lib/CoreLibs/Admin/EditBase.php index 05538daf..23e8938f 100644 --- a/www/lib/CoreLibs/Admin/EditBase.php +++ b/www/lib/CoreLibs/Admin/EditBase.php @@ -35,6 +35,8 @@ class EditBase private \CoreLibs\Output\Form\Generate $form; /** @var \CoreLibs\Logging\Logging */ public \CoreLibs\Logging\Logging $log; + /** @var \CoreLibs\Language\L10n */ + public \CoreLibs\Language\L10n $l; /** @var \CoreLibs\ACL\Login */ public \CoreLibs\ACL\Login $login; @@ -57,6 +59,7 @@ class EditBase ) { $this->log = $log; $this->login = $login; + $this->l = $l10n; // smarty template engine (extended Translation version) $this->smarty = new \CoreLibs\Template\SmartyExtend( $l10n, @@ -77,7 +80,7 @@ class EditBase echo "I am sorry, but this page cannot be viewed by a mobile phone"; exit; } - // $this->form->log->debug('POST', $this->form->log->prAr($_POST)); + // $this->log->debug('POST', $this->log->prAr($_POST)); } /** @@ -179,7 +182,7 @@ class EditBase } // while read data ... // html title - $this->HEADER['HTML_TITLE'] = $this->form->l->__('Edit Order'); + $this->HEADER['HTML_TITLE'] = $this->l->__('Edit Order'); $messages = []; $error = $_POST['error'] ?? 0; @@ -632,7 +635,7 @@ class EditBase 'editAdmin_' . $this->smarty->lang ); - $this->form->log->debug('DEBUGEND', '==================================== [Form END]'); + $this->log->debug('DEBUGEND', '==================================== [Form END]'); } } diff --git a/www/lib/CoreLibs/Output/Form/TableArrays/EditOrder.php b/www/lib/CoreLibs/Output/Form/TableArrays/EditOrder.php new file mode 100644 index 00000000..b67c2ef3 --- /dev/null +++ b/www/lib/CoreLibs/Output/Form/TableArrays/EditOrder.php @@ -0,0 +1,40 @@ +form = $form; + $this->form->log->debug('CLASS LOAD', __NAMESPACE__ . __CLASS__); + } + + /** + * NOTE: this is a dummy array to just init the Form\Generate class and is not used for anything else + * + * @return array + */ + public function setTableArray(): array + { + return [ + 'table_array' => [ + '-' + ], + 'table_name' => '-', + 'load_query' => '', + 'show_fields' => [], + ]; + } +} + +// __END__ diff --git a/www/vendor/composer/autoload_classmap.php b/www/vendor/composer/autoload_classmap.php index ebec90f5..89abb357 100644 --- a/www/vendor/composer/autoload_classmap.php +++ b/www/vendor/composer/autoload_classmap.php @@ -68,6 +68,7 @@ return array( 'CoreLibs\\Output\\Form\\TableArrays\\EditGroups' => $baseDir . '/lib/CoreLibs/Output/Form/TableArrays/EditGroups.php', 'CoreLibs\\Output\\Form\\TableArrays\\EditLanguages' => $baseDir . '/lib/CoreLibs/Output/Form/TableArrays/EditLanguages.php', 'CoreLibs\\Output\\Form\\TableArrays\\EditMenuGroup' => $baseDir . '/lib/CoreLibs/Output/Form/TableArrays/EditMenuGroup.php', + 'CoreLibs\\Output\\Form\\TableArrays\\EditOrder' => $baseDir . '/lib/CoreLibs/Output/Form/TableArrays/EditOrder.php', 'CoreLibs\\Output\\Form\\TableArrays\\EditPages' => $baseDir . '/lib/CoreLibs/Output/Form/TableArrays/EditPages.php', 'CoreLibs\\Output\\Form\\TableArrays\\EditSchemas' => $baseDir . '/lib/CoreLibs/Output/Form/TableArrays/EditSchemas.php', 'CoreLibs\\Output\\Form\\TableArrays\\EditUsers' => $baseDir . '/lib/CoreLibs/Output/Form/TableArrays/EditUsers.php', diff --git a/www/vendor/composer/autoload_static.php b/www/vendor/composer/autoload_static.php index 1d1bc678..d992fdef 100644 --- a/www/vendor/composer/autoload_static.php +++ b/www/vendor/composer/autoload_static.php @@ -119,6 +119,7 @@ class ComposerStaticInit10fe8fe2ec4017b8644d2b64bcf398b9 'CoreLibs\\Output\\Form\\TableArrays\\EditGroups' => __DIR__ . '/../..' . '/lib/CoreLibs/Output/Form/TableArrays/EditGroups.php', 'CoreLibs\\Output\\Form\\TableArrays\\EditLanguages' => __DIR__ . '/../..' . '/lib/CoreLibs/Output/Form/TableArrays/EditLanguages.php', 'CoreLibs\\Output\\Form\\TableArrays\\EditMenuGroup' => __DIR__ . '/../..' . '/lib/CoreLibs/Output/Form/TableArrays/EditMenuGroup.php', + 'CoreLibs\\Output\\Form\\TableArrays\\EditOrder' => __DIR__ . '/../..' . '/lib/CoreLibs/Output/Form/TableArrays/EditOrder.php', 'CoreLibs\\Output\\Form\\TableArrays\\EditPages' => __DIR__ . '/../..' . '/lib/CoreLibs/Output/Form/TableArrays/EditPages.php', 'CoreLibs\\Output\\Form\\TableArrays\\EditSchemas' => __DIR__ . '/../..' . '/lib/CoreLibs/Output/Form/TableArrays/EditSchemas.php', 'CoreLibs\\Output\\Form\\TableArrays\\EditUsers' => __DIR__ . '/../..' . '/lib/CoreLibs/Output/Form/TableArrays/EditUsers.php',