Add unique page name check for edit pages, bug fixes in Form Template Generate and DB Array IO classes

This commit is contained in:
2024-03-21 12:45:39 +09:00
parent 3f5b3f02ad
commit 94edb7f556
9 changed files with 10 additions and 9 deletions

View File

@@ -3,7 +3,7 @@
<phar name="phpunit" version="^9.6" installed="9.6.17" location="./tools/phpunit" copy="false"/> <phar name="phpunit" version="^9.6" installed="9.6.17" location="./tools/phpunit" copy="false"/>
<phar name="phpcs" version="^3.7.2" installed="3.9.0" location="./tools/phpcs" copy="false"/> <phar name="phpcs" version="^3.7.2" installed="3.9.0" location="./tools/phpcs" copy="false"/>
<phar name="phpcbf" version="^3.7.2" installed="3.9.0" location="./tools/phpcbf" copy="false"/> <phar name="phpcbf" version="^3.7.2" installed="3.9.0" location="./tools/phpcbf" copy="false"/>
<phar name="psalm" version="^5.15.0" installed="5.22.2" location="./tools/psalm" copy="false"/> <phar name="psalm" version="^5.15.0" installed="5.23.1" location="./tools/psalm" copy="false"/>
<phar name="phpstan" version="^1.10.37" installed="1.10.59" location="./tools/phpstan" copy="false"/> <phar name="phpstan" version="^1.10.37" installed="1.10.63" location="./tools/phpstan" copy="false"/>
<phar name="phan" version="^5.4.2" installed="5.4.3" location="./tools/phan" copy="false"/> <phar name="phan" version="^5.4.2" installed="5.4.3" location="./tools/phan" copy="false"/>
</phive> </phive>

View File

@@ -236,7 +236,7 @@ class ArrayIO extends \CoreLibs\DB\IO
*/ */
public function getPkId(): int|string|null public function getPkId(): int|string|null
{ {
return $this->pk_id; return $this->pk_id ?? null;
} }
/** /**

View File

@@ -1507,7 +1507,7 @@ class Generate
} }
if ( if (
!empty($this->reference_array[$key]['mandatory']) && !empty($this->reference_array[$key]['mandatory']) &&
!$this->reference_array[$key]['selected'][0] empty($this->reference_array[$key]['selected'][0])
) { ) {
$this->msg .= sprintf( $this->msg .= sprintf(
$this->l->__('Please select at least one Element from field <b>%s</b>!<br>'), $this->l->__('Please select at least one Element from field <b>%s</b>!<br>'),

View File

@@ -53,6 +53,7 @@ class EditPages implements Interface\TableArraysInterface
'value' => $_POST['name'] ?? '', 'value' => $_POST['name'] ?? '',
'output_name' => 'Page name', 'output_name' => 'Page name',
'mandatory' => 1, 'mandatory' => 1,
'error_check' => 'unique',
'type' => 'text' 'type' => 'text'
], ],
'order_number' => [ 'order_number' => [

View File

@@ -1,2 +1,2 @@
base="/storage/var/www/html/developers/clemens/core_data/composer-packages/CoreLibs-Composer-All/"; base="/storage/var/www/html/developers/clemens/core_data/composer-packages/CoreLibs-Composer-All/";
vendor/bin/phan --progress-bar -C --analyze-twice tools/phan --progress-bar -C --analyze-twice

View File

@@ -1,2 +1,2 @@
base="/storage/var/www/html/developers/clemens/core_data/composer-packages/CoreLibs-Composer-All/"; base="/storage/var/www/html/developers/clemens/core_data/composer-packages/CoreLibs-Composer-All/";
vendor/bin/phpstan tools/phpstan

View File

@@ -33,7 +33,7 @@ if [ ! -z "${2}" ] && [ -z "${php_bin}" ]; then
esac; esac;
fi; fi;
phpunit_call="${php_bin}${base}vendor/bin/phpunit ${opt_testdox} -c ${base}phpunit.xml ${base}test/phpunit/"; phpunit_call="${php_bin}${base}tools/phpunit ${opt_testdox} -c ${base}phpunit.xml ${base}test/phpunit/";
${phpunit_call}; ${phpunit_call};

View File

@@ -1 +1 @@
/home/clemens/.phive/phars/phpstan-1.10.59.phar /home/clemens/.phive/phars/phpstan-1.10.63.phar

View File

@@ -1 +1 @@
/home/clemens/.phive/phars/psalm-5.22.2.phar /home/clemens/.phive/phars/psalm-5.23.1.phar