diff --git a/src/Admin/EditBase.php b/src/Admin/EditBase.php index 05538da..23e8938 100644 --- a/src/Admin/EditBase.php +++ b/src/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/src/Output/Form/Generate.php b/src/Output/Form/Generate.php index ba23f1e..3d529fc 100644 --- a/src/Output/Form/Generate.php +++ b/src/Output/Form/Generate.php @@ -300,7 +300,8 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO // log /** @var \CoreLibs\Logging\Logging */ public \CoreLibs\Logging\Logging $log; - + /** @var \CoreLibs\DB\Extended\ArrayIO */ + public \CoreLibs\DB\Extended\ArrayIO $dba; // now some default error msgs (english) /** @var array */ public array $language_array = []; @@ -382,6 +383,15 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO $this->base_acl_level, $this->acl_admin ); + $this->dba = new \CoreLibs\DB\Extended\ArrayIO( + $db_config, + $config_array['table_array'], + $config_array['table_name'], + $this->log, + // set the ACL + $this->base_acl_level, + $this->acl_admin + ); // here should be a check if the config_array is correct ... if (isset($config_array['show_fields']) && is_array($config_array['show_fields'])) { $this->field_array = $config_array['show_fields']; diff --git a/src/Output/Form/TableArrays/EditOrder.php b/src/Output/Form/TableArrays/EditOrder.php new file mode 100644 index 0000000..b67c2ef --- /dev/null +++ b/src/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__