Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95bee3dc8c | ||
|
|
65132d8a4a | ||
|
|
b2243cd06d | ||
|
|
8f09b67d86 |
@@ -106,6 +106,7 @@ final class CoreLibsLoggingErrorMessagesTest extends TestCase
|
|||||||
'str' => $str,
|
'str' => $str,
|
||||||
'id' => '',
|
'id' => '',
|
||||||
'target' => '',
|
'target' => '',
|
||||||
|
'target_style' => '',
|
||||||
'highlight' => [],
|
'highlight' => [],
|
||||||
],
|
],
|
||||||
$em->getLastErrorMsg()
|
$em->getLastErrorMsg()
|
||||||
@@ -139,6 +140,7 @@ final class CoreLibsLoggingErrorMessagesTest extends TestCase
|
|||||||
'level' => 'info',
|
'level' => 'info',
|
||||||
'str' => 'INFO MESSAGE',
|
'str' => 'INFO MESSAGE',
|
||||||
'target' => '',
|
'target' => '',
|
||||||
|
'target_style' => '',
|
||||||
'highlight' => [],
|
'highlight' => [],
|
||||||
],
|
],
|
||||||
$em->getLastErrorMsg()
|
$em->getLastErrorMsg()
|
||||||
@@ -154,6 +156,7 @@ final class CoreLibsLoggingErrorMessagesTest extends TestCase
|
|||||||
'level' => 'info',
|
'level' => 'info',
|
||||||
'str' => 'INFO MESSAGE',
|
'str' => 'INFO MESSAGE',
|
||||||
'target' => '',
|
'target' => '',
|
||||||
|
'target_style' => '',
|
||||||
'highlight' => [],
|
'highlight' => [],
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
@@ -171,6 +174,7 @@ final class CoreLibsLoggingErrorMessagesTest extends TestCase
|
|||||||
'level' => 'error',
|
'level' => 'error',
|
||||||
'str' => 'ERROR MESSAGE',
|
'str' => 'ERROR MESSAGE',
|
||||||
'target' => '',
|
'target' => '',
|
||||||
|
'target_style' => '',
|
||||||
'highlight' => [],
|
'highlight' => [],
|
||||||
],
|
],
|
||||||
$em->getLastErrorMsg()
|
$em->getLastErrorMsg()
|
||||||
@@ -186,6 +190,7 @@ final class CoreLibsLoggingErrorMessagesTest extends TestCase
|
|||||||
'level' => 'info',
|
'level' => 'info',
|
||||||
'str' => 'INFO MESSAGE',
|
'str' => 'INFO MESSAGE',
|
||||||
'target' => '',
|
'target' => '',
|
||||||
|
'target_style' => '',
|
||||||
'highlight' => [],
|
'highlight' => [],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -193,6 +198,7 @@ final class CoreLibsLoggingErrorMessagesTest extends TestCase
|
|||||||
'level' => 'error',
|
'level' => 'error',
|
||||||
'str' => 'ERROR MESSAGE',
|
'str' => 'ERROR MESSAGE',
|
||||||
'target' => '',
|
'target' => '',
|
||||||
|
'target_style' => '',
|
||||||
'highlight' => [],
|
'highlight' => [],
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ class EditBase
|
|||||||
private \CoreLibs\Output\Form\Generate $form;
|
private \CoreLibs\Output\Form\Generate $form;
|
||||||
/** @var \CoreLibs\Logging\Logging */
|
/** @var \CoreLibs\Logging\Logging */
|
||||||
public \CoreLibs\Logging\Logging $log;
|
public \CoreLibs\Logging\Logging $log;
|
||||||
|
/** @var \CoreLibs\Language\L10n */
|
||||||
|
public \CoreLibs\Language\L10n $l;
|
||||||
/** @var \CoreLibs\ACL\Login */
|
/** @var \CoreLibs\ACL\Login */
|
||||||
public \CoreLibs\ACL\Login $login;
|
public \CoreLibs\ACL\Login $login;
|
||||||
|
|
||||||
@@ -57,6 +59,7 @@ class EditBase
|
|||||||
) {
|
) {
|
||||||
$this->log = $log;
|
$this->log = $log;
|
||||||
$this->login = $login;
|
$this->login = $login;
|
||||||
|
$this->l = $l10n;
|
||||||
// smarty template engine (extended Translation version)
|
// smarty template engine (extended Translation version)
|
||||||
$this->smarty = new \CoreLibs\Template\SmartyExtend(
|
$this->smarty = new \CoreLibs\Template\SmartyExtend(
|
||||||
$l10n,
|
$l10n,
|
||||||
@@ -77,7 +80,7 @@ class EditBase
|
|||||||
echo "I am sorry, but this page cannot be viewed by a mobile phone";
|
echo "I am sorry, but this page cannot be viewed by a mobile phone";
|
||||||
exit;
|
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 ...
|
} // while read data ...
|
||||||
|
|
||||||
// html title
|
// html title
|
||||||
$this->HEADER['HTML_TITLE'] = $this->form->l->__('Edit Order');
|
$this->HEADER['HTML_TITLE'] = $this->l->__('Edit Order');
|
||||||
|
|
||||||
$messages = [];
|
$messages = [];
|
||||||
$error = $_POST['error'] ?? 0;
|
$error = $_POST['error'] ?? 0;
|
||||||
@@ -632,7 +635,7 @@ class EditBase
|
|||||||
'editAdmin_' . $this->smarty->lang
|
'editAdmin_' . $this->smarty->lang
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->form->log->debug('DEBUGEND', '==================================== [Form END]');
|
$this->log->debug('DEBUGEND', '==================================== [Form END]');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ class ArrayIO extends \CoreLibs\DB\IO
|
|||||||
public function dbCheckPkSet(): bool
|
public function dbCheckPkSet(): bool
|
||||||
{
|
{
|
||||||
// if pk_id is set, overrule ...
|
// if pk_id is set, overrule ...
|
||||||
if ($this->pk_id) {
|
if (!empty($this->pk_id)) {
|
||||||
$this->table_array[$this->pk_name]['value'] = $this->pk_id;
|
$this->table_array[$this->pk_name]['value'] = $this->pk_id;
|
||||||
}
|
}
|
||||||
// if not set ... produce error
|
// if not set ... produce error
|
||||||
|
|||||||
@@ -3232,7 +3232,7 @@ class IO
|
|||||||
*
|
*
|
||||||
* @param array<mixed> $write_array list of elements to write
|
* @param array<mixed> $write_array list of elements to write
|
||||||
* @param array<mixed> $not_write_array list of elements not to write
|
* @param array<mixed> $not_write_array list of elements not to write
|
||||||
* @param int $primary_key id key to decide if we write insert or update
|
* @param int|null $primary_key id key to decide if we write insert or update
|
||||||
* @param string $table name for the target table
|
* @param string $table name for the target table
|
||||||
* @param array<mixed> $data data array to override _POST data
|
* @param array<mixed> $data data array to override _POST data
|
||||||
* @return int|false primary key
|
* @return int|false primary key
|
||||||
@@ -3240,7 +3240,7 @@ class IO
|
|||||||
public function dbWriteData(
|
public function dbWriteData(
|
||||||
array $write_array,
|
array $write_array,
|
||||||
array $not_write_array,
|
array $not_write_array,
|
||||||
int $primary_key,
|
?int $primary_key,
|
||||||
string $table,
|
string $table,
|
||||||
array $data = []
|
array $data = []
|
||||||
): int|false {
|
): int|false {
|
||||||
@@ -3260,19 +3260,19 @@ class IO
|
|||||||
* PARAM INFO: $primary key
|
* PARAM INFO: $primary key
|
||||||
* this can be a plain string/int and will be internal transformed into the array form
|
* this can be a plain string/int and will be internal transformed into the array form
|
||||||
* or it takes the array form of array [row => column, value => pk value]
|
* or it takes the array form of array [row => column, value => pk value]
|
||||||
* @param array<mixed> $write_array list of elements to write
|
* @param array<mixed> $write_array list of elements to write
|
||||||
* @param int|string|array<mixed> $primary_key primary key string or array set
|
* @param null|int|string|array<mixed> $primary_key primary key string or array set
|
||||||
* @param string $table name for the target table
|
* @param string $table name for the target table
|
||||||
* @param array<mixed> $not_write_array list of elements not to write (optional)
|
* @param array<mixed> $not_write_array list of elements not to write (optional)
|
||||||
* @param array<mixed> $not_write_update_array list of elements not
|
* @param array<mixed> $not_write_update_array list of elements not
|
||||||
* to write during update (optional)
|
* to write during update (optional)
|
||||||
* @param array<mixed> $data optional array with data
|
* @param array<mixed> $data optional array with data
|
||||||
* if not _POST vars are used
|
* if not _POST vars are used
|
||||||
* @return int|false primary key
|
* @return int|false primary key
|
||||||
*/
|
*/
|
||||||
public function dbWriteDataExt(
|
public function dbWriteDataExt(
|
||||||
array $write_array,
|
array $write_array,
|
||||||
int|string|array $primary_key,
|
null|int|string|array $primary_key,
|
||||||
string $table,
|
string $table,
|
||||||
array $not_write_array = [],
|
array $not_write_array = [],
|
||||||
array $not_write_update_array = [],
|
array $not_write_update_array = [],
|
||||||
|
|||||||
40
www/lib/CoreLibs/Output/Form/TableArrays/EditOrder.php
Normal file
40
www/lib/CoreLibs/Output/Form/TableArrays/EditOrder.php
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace CoreLibs\Output\Form\TableArrays;
|
||||||
|
|
||||||
|
class EditOrder implements Interface\TableArraysInterface
|
||||||
|
{
|
||||||
|
/** @var \CoreLibs\Output\Form\Generate */
|
||||||
|
private \CoreLibs\Output\Form\Generate $form;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* constructor
|
||||||
|
* @param \CoreLibs\Output\Form\Generate $form base form class
|
||||||
|
*/
|
||||||
|
public function __construct(\CoreLibs\Output\Form\Generate $form)
|
||||||
|
{
|
||||||
|
$this->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<mixed>
|
||||||
|
*/
|
||||||
|
public function setTableArray(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'table_array' => [
|
||||||
|
'-'
|
||||||
|
],
|
||||||
|
'table_name' => '-',
|
||||||
|
'load_query' => '',
|
||||||
|
'show_fields' => [],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// __END__
|
||||||
1
www/vendor/composer/autoload_classmap.php
vendored
1
www/vendor/composer/autoload_classmap.php
vendored
@@ -68,6 +68,7 @@ return array(
|
|||||||
'CoreLibs\\Output\\Form\\TableArrays\\EditGroups' => $baseDir . '/lib/CoreLibs/Output/Form/TableArrays/EditGroups.php',
|
'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\\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\\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\\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\\EditSchemas' => $baseDir . '/lib/CoreLibs/Output/Form/TableArrays/EditSchemas.php',
|
||||||
'CoreLibs\\Output\\Form\\TableArrays\\EditUsers' => $baseDir . '/lib/CoreLibs/Output/Form/TableArrays/EditUsers.php',
|
'CoreLibs\\Output\\Form\\TableArrays\\EditUsers' => $baseDir . '/lib/CoreLibs/Output/Form/TableArrays/EditUsers.php',
|
||||||
|
|||||||
1
www/vendor/composer/autoload_static.php
vendored
1
www/vendor/composer/autoload_static.php
vendored
@@ -119,6 +119,7 @@ class ComposerStaticInit10fe8fe2ec4017b8644d2b64bcf398b9
|
|||||||
'CoreLibs\\Output\\Form\\TableArrays\\EditGroups' => __DIR__ . '/../..' . '/lib/CoreLibs/Output/Form/TableArrays/EditGroups.php',
|
'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\\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\\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\\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\\EditSchemas' => __DIR__ . '/../..' . '/lib/CoreLibs/Output/Form/TableArrays/EditSchemas.php',
|
||||||
'CoreLibs\\Output\\Form\\TableArrays\\EditUsers' => __DIR__ . '/../..' . '/lib/CoreLibs/Output/Form/TableArrays/EditUsers.php',
|
'CoreLibs\\Output\\Form\\TableArrays\\EditUsers' => __DIR__ . '/../..' . '/lib/CoreLibs/Output/Form/TableArrays/EditUsers.php',
|
||||||
|
|||||||
Reference in New Issue
Block a user