Merge branch 'QA_5_2'

Config get was removed in 7547341bee

Config set was changed into adc834f1ae

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2026-03-05 12:45:13 +01:00
commit b3e2ac1ece
No known key found for this signature in database
GPG Key ID: 70684F4717D49A31
11 changed files with 176 additions and 107 deletions

View File

@ -192,9 +192,13 @@ validateExtension() {
for filePath in ${FILE_LIST}; do
validateExtension
case $filePath in
*/rector*.php)
*/composer-require-checker.json)
foundFile;;
*/.gitkeep)
*/CLAUDE.MD)
foundFile;;
*/Readme.php)
foundFile;;
*/rector*.php)
foundFile;;
*/.editorconfig)
foundFile;;
@ -204,16 +208,28 @@ for filePath in ${FILE_LIST}; do
foundFile;;
*/psalm.xml)
foundFile;;
*/psalm.xml.dist)
foundFile;;
*/phpdoc.xml)
foundFile;;
*/phpdoc.dist.xml)
foundFile;;
*/.coveralls.yml)
foundFile;;
*/.yamllint.yaml)
foundFile;;
*/appveyor.yml)
foundFile;;
*/phpunit.xml)
foundFile;;
*/phpunit.xml.dist)
foundFile;;
*/phive.xml)
foundFile;;
*/Makefile)
foundFile;;
*/splitsh.json)
foundFile;;
*/phpbench.json)
foundFile;;
*/phpbench.json.dist)
@ -226,11 +242,17 @@ for filePath in ${FILE_LIST}; do
foundFile;;
*/.php_cs.cache)
foundFile;;
*/phpstan.neon)
*/.php-cs-fixer.php)
foundFile;;
*/psalm.xml)
foundFile;;
*/phpcs.xml)
foundFile;;
*/phpcs.xml.dist)
foundFile;;
*/phpunit.xml.dist)
*/ecs.php)
foundFile;;
*/easy-coding-standard.neon)
foundFile;;
*/.scrutinizer.yml)
foundFile;;
@ -242,6 +264,12 @@ for filePath in ${FILE_LIST}; do
foundFile;;
*/.gitignore)
foundFile;;
*/.gitkeep)
foundFile;;
*/.mailmap)
foundFile;;
*/.env)
foundFile;;
*/infection.json.dist)
foundFile;;
*/infection.json)
@ -254,6 +282,8 @@ for filePath in ${FILE_LIST}; do
foundFile;;
*/.phpunit.result.cache)
foundFile;;
*/phpstan.neon)
foundFile;;
*/phpstan.neon.dist)
foundFile;;
*/phpstan-baseline.neon)

View File

@ -84,8 +84,8 @@ while [ $# -gt 0 ] ; do
echo "If --stable is specified, the STABLE branch is updated with this release"
echo "If --test is specified, the testsuite is executed before creating the release"
echo "If --ci is specified, the testsuite is executed and no actual release is created"
echo "If --no-sign is specified, the ouput files will not be signed"
echo "If --daily is specified, the ouput files will have snapshot information"
echo "If --no-sign is specified, the output files will not be signed"
echo "If --daily is specified, the output files will have snapshot information"
echo "If --revision-info is specified, the output files will contain git revision info"
echo "If --compressions is specified, it changes the compressions available. Space separated values. Valid values: $COMPRESSIONS"
echo "If --kits is specified, it changes the kits to be built. Space separated values. Valid values: $KITS"
@ -151,63 +151,47 @@ mark_as_release() {
cleanup_composer_vendors() {
echo "* Cleanup of composer packages"
rm -rf \
vendor/phpmyadmin/sql-parser/tests/ \
vendor/phpmyadmin/sql-parser/tools/ \
vendor/phpmyadmin/sql-parser/src/Tools/ \
vendor/phpmyadmin/sql-parser/locale/sqlparser.pot \
vendor/phpmyadmin/sql-parser/locale/*/LC_MESSAGES/sqlparser.po \
vendor/phpmyadmin/sql-parser/bin/ \
vendor/phpmyadmin/sql-parser/phpunit.xml.dist \
vendor/phpmyadmin/motranslator/phpunit.xml.dist \
vendor/phpmyadmin/motranslator/tests/ \
vendor/phpmyadmin/shapefile/codecov.yml \
vendor/phpmyadmin/shapefile/phpunit.xml.dist \
vendor/phpmyadmin/shapefile/tests/ \
vendor/phpmyadmin/shapefile/examples/ \
vendor/phpmyadmin/shapefile/data/ \
vendor/phpmyadmin/shapefile/phpstan-baseline.neon \
vendor/phpmyadmin/shapefile/phpstan.neon.dist \
vendor/phpmyadmin/twig-i18n-extension/README.rst \
vendor/phpmyadmin/twig-i18n-extension/phpunit.xml.dist \
vendor/phpmyadmin/twig-i18n-extension/test/ \
vendor/symfony/cache/Tests/ \
vendor/symfony/service-contracts/Test/ \
vendor/symfony/expression-language/Tests/ \
vendor/symfony/expression-language/Resources/ \
vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1.0.xsd \
vendor/tecnickcom/tcpdf/examples/ \
vendor/tecnickcom/tcpdf/tools/ \
vendor/tecnickcom/tcpdf/fonts/ae_fonts_*/ \
vendor/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.*/ \
vendor/tecnickcom/tcpdf/fonts/freefont-*/ \
vendor/tecnickcom/tcpdf/include/sRGB.icc \
vendor/tecnickcom/tcpdf/.git \
vendor/tecnickcom/tcpdf/.github/ \
vendor/bacon/bacon-qr-code/phpunit.xml.dist \
vendor/bacon/bacon-qr-code/test/ \
# Normally already deleted, keep them for some time if they come back (it happens)
rm -rvf \
vendor/beberlei/assert/.github/ \
vendor/code-lts/u2f-php-server/phpunit.xml \
vendor/code-lts/u2f-php-server/test/ \
vendor/dasprid/enum/.github/ \
vendor/dasprid/enum/phpunit.xml.dist \
vendor/dasprid/enum/test/ \
vendor/williamdes/mariadb-mysql-kbs/phpunit.xml \
vendor/williamdes/mariadb-mysql-kbs/test/ \
vendor/williamdes/mariadb-mysql-kbs/schemas/ \
vendor/williamdes/mariadb-mysql-kbs/dist/merged-raw.json \
vendor/williamdes/mariadb-mysql-kbs/dist/merged-raw.md \
vendor/williamdes/mariadb-mysql-kbs/dist/merged-slim.json \
vendor/williamdes/mariadb-mysql-kbs/dist/merged-ultraslim.php \
vendor/code-lts/u2f-php-server/phpunit.xml \
vendor/code-lts/u2f-php-server/test/ \
vendor/nikic/fast-route/.travis.yml \
vendor/nikic/fast-route/.hhconfig \
vendor/nikic/fast-route/FastRoute.hhi \
vendor/nikic/fast-route/phpunit.xml \
vendor/nikic/fast-route/psalm.xml \
vendor/nikic/fast-route/test/ \
vendor/paragonie/constant_time_encoding/tests/ \
vendor/paragonie/constant_time_encoding/psalm.xml \
vendor/paragonie/constant_time_encoding/phpunit.xml.dist \
vendor/paragonie/constant_time_encoding/.travis.yml \
vendor/paragonie/sodium_compat/.github/ \
vendor/paragonie/sodium_compat/dist/ \
vendor/paragonie/sodium_compat/phpunit.xml.dist \
vendor/paragonie/sodium_compat/.gitignore \
vendor/paragonie/sodium_compat/psalm-above-3.xml \
vendor/paragonie/sodium_compat/psalm-below-3.xml \
vendor/paragonie/sodium_compat/build-phar.sh \
vendor/paragonie/sodium_compat/appveyor.yml \
vendor/paragonie/sodium_compat/autoload-phpunit.php \
vendor/paragonie/sodium_compat/autoload-pedantic.php \
vendor/paragonie/sodium_compat/autoload-fast.php \
vendor/psr/http-factory/.pullapprove.yml \
vendor/pragmarx/google2fa/phpstan.neon \
vendor/phpmyadmin/shapefile/CODE_OF_CONDUCT.md \
vendor/phpmyadmin/sql-parser/tools/ \
vendor/phpmyadmin/sql-parser/CODE_OF_CONDUCT.md \
vendor/phpmyadmin/sql-parser/CONTRIBUTING.md \
vendor/phpmyadmin/shapefile/phpstan-baseline.neon \
vendor/phpmyadmin/shapefile/phpstan.neon.dist \
vendor/phpmyadmin/shapefile/codecov.yml \
vendor/symfony/cache/Tests/ \
vendor/symfony/expression-language/Tests/ \
vendor/tecnickcom/tcpdf/examples/ \
vendor/tecnickcom/tcpdf/.git \
vendor/tecnickcom/tcpdf/.github/ \
vendor/twig/twig/doc/ \
vendor/twig/twig/test/ \
vendor/twig/twig/.github/ \
vendor/twig/twig/README.rst \
vendor/twig/twig/.travis.yml \
vendor/twig/twig/.editorconfig \
vendor/twig/twig/.php_cs.dist \
@ -217,21 +201,75 @@ cleanup_composer_vendors() {
vendor/webmozart/assert/.github/ \
vendor/webmozart/assert/.php_cs \
vendor/webmozart/assert/psalm.xml \
vendor/williamdes/mariadb-mysql-kbs/phpunit.xml \
vendor/williamdes/mariadb-mysql-kbs/test/
rm -r \
vendor/phpmyadmin/sql-parser/tests/ \
vendor/phpmyadmin/sql-parser/src/Tools/ \
vendor/phpmyadmin/sql-parser/locale/sqlparser.pot \
vendor/phpmyadmin/sql-parser/locale/*/LC_MESSAGES/sqlparser.po \
vendor/phpmyadmin/sql-parser/bin/ \
vendor/phpmyadmin/sql-parser/phpunit.xml.dist \
vendor/phpmyadmin/motranslator/phpunit.xml.dist \
vendor/phpmyadmin/motranslator/tests/ \
vendor/phpmyadmin/shapefile/phpunit.xml.dist \
vendor/phpmyadmin/shapefile/tests/ \
vendor/phpmyadmin/shapefile/examples/ \
vendor/phpmyadmin/shapefile/data/ \
vendor/phpmyadmin/twig-i18n-extension/README.rst \
vendor/phpmyadmin/twig-i18n-extension/phpunit.xml.dist \
vendor/phpmyadmin/twig-i18n-extension/test/ \
vendor/symfony/service-contracts/Test/ \
vendor/symfony/expression-language/Resources/ \
vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1.0.xsd \
vendor/tecnickcom/tcpdf/tools/ \
vendor/tecnickcom/tcpdf/fonts/ae_fonts_*/ \
vendor/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.*/ \
vendor/tecnickcom/tcpdf/fonts/freefont-*/ \
vendor/tecnickcom/tcpdf/include/sRGB.icc \
vendor/thecodingmachine/safe/generated/Exceptions/.gitkeep \
vendor/thecodingmachine/safe/rector-migrate-0.7.php \
vendor/bacon/bacon-qr-code/phpunit.xml.dist \
vendor/bacon/bacon-qr-code/test/ \
vendor/brick/math/psalm-baseline.xml \
vendor/brick/math/psalm.xml \
vendor/williamdes/mariadb-mysql-kbs/schemas/ \
vendor/williamdes/mariadb-mysql-kbs/dist/merged-raw.json \
vendor/williamdes/mariadb-mysql-kbs/dist/merged-raw.md \
vendor/williamdes/mariadb-mysql-kbs/dist/merged-slim.json \
vendor/williamdes/mariadb-mysql-kbs/dist/merged-ultraslim.php \
vendor/nikic/fast-route/.travis.yml \
vendor/nikic/fast-route/.hhconfig \
vendor/nikic/fast-route/FastRoute.hhi \
vendor/nikic/fast-route/phpunit.xml \
vendor/nikic/fast-route/psalm.xml \
vendor/nikic/fast-route/test/ \
vendor/twig/twig/README.rst \
vendor/webmozart/assert/.php-cs-fixer.php \
vendor/twig/twig/src/Test/ \
vendor/psr/http-message/docs/ \
vendor/psr/log/Psr/Log/Test/ \
vendor/psr/http-factory/.pullapprove.yml \
vendor/slim/psr7/MAINTAINERS.md \
vendor/paragonie/constant_time_encoding/tests/ \
vendor/paragonie/constant_time_encoding/psalm.xml \
vendor/paragonie/constant_time_encoding/phpunit.xml.dist \
vendor/paragonie/constant_time_encoding/.travis.yml \
vendor/paragonie/random_compat/other/build_phar.php \
vendor/paragonie/random_compat/other \
vendor/paragonie/random_compat/build-phar.sh \
vendor/paragonie/random_compat/dist/random_compat.phar.pubkey \
vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc \
vendor/paragonie/random_compat/dist \
vendor/paragonie/random_compat/psalm-autoload.php \
vendor/paragonie/random_compat/psalm.xml \
vendor/paragonie/sodium_compat/composer-php52.json \
vendor/paragonie/sodium_compat/src/PHP52/SplFixedArray.php \
vendor/paragonie/sodium_compat/src/PHP52 \
vendor/pragmarx/google2fa/.github/ \
vendor/pragmarx/google2fa/phpstan.neon \
vendor/pragmarx/google2fa-qrcode/.scrutinizer.yml \
vendor/pragmarx/google2fa-qrcode/.travis.yml \
vendor/pragmarx/google2fa-qrcode/phpunit.xml \
vendor/pragmarx/google2fa-qrcode/tests \
vendor/spomky-labs/base64url/.github/ \
vendor/spomky-labs/cbor-php/.php_cs.dist \
vendor/spomky-labs/cbor-php/infection.json.dist \
vendor/spomky-labs/cbor-php/phpstan.neon \
vendor/google/recaptcha/src/autoload.php \
vendor/google/recaptcha/app.yaml \
vendor/google/recaptcha/.travis.yml \
@ -239,40 +277,19 @@ cleanup_composer_vendors() {
vendor/google/recaptcha/.github/ \
vendor/google/recaptcha/examples/ \
vendor/google/recaptcha/tests/
rm -rf \
rm \
vendor/slim/psr7/MAINTAINERS.md \
vendor/google/recaptcha/ARCHITECTURE.md \
vendor/google/recaptcha/CONTRIBUTING.md \
vendor/phpmyadmin/motranslator/CODE_OF_CONDUCT.md \
vendor/phpmyadmin/motranslator/CONTRIBUTING.md \
vendor/phpmyadmin/motranslator/PERFORMANCE.md \
vendor/phpmyadmin/shapefile/CONTRIBUTING.md \
vendor/phpmyadmin/shapefile/CODE_OF_CONDUCT.md \
vendor/phpmyadmin/sql-parser/CODE_OF_CONDUCT.md \
vendor/phpmyadmin/sql-parser/CONTRIBUTING.md \
vendor/beberlei/assert/.github/ \
vendor/brick/math/SECURITY.md \
vendor/brick/math/psalm-baseline.xml \
vendor/brick/math/psalm.xml \
vendor/ramsey/collection/conventional-commits.json \
vendor/ramsey/collection/SECURITY.md \
vendor/spomky-labs/base64url/.github/ \
vendor/spomky-labs/cbor-php/.php_cs.dist \
vendor/spomky-labs/cbor-php/CODE_OF_CONDUCT.md \
vendor/spomky-labs/cbor-php/infection.json.dist \
vendor/spomky-labs/cbor-php/phpstan.neon \
vendor/thecodingmachine/safe/generated/Exceptions/.gitkeep \
vendor/thecodingmachine/safe/rector-migrate-0.7.php \
vendor/phpmyadmin/motranslator/psalm-baseline.xml \
vendor/phpmyadmin/motranslator/psalm.xml \
vendor/slim/psr7/phpunit.xml.dist \
vendor/slim/psr7/tests/ \
vendor/psr/event-dispatcher/.editorconfig \
vendor/spomky-labs/cbor-php/SECURITY.md \
vendor/spomky-labs/pki-framework/SECURITY.md \
vendor/web-auth/cose-lib/SECURITY.md \
vendor/laminas/laminas-httphandlerrunner/.laminas-ci.json \
vendor/twig/twig/phpstan-baseline.neon \
vendor/twig/twig/phpstan.neon.dist
vendor/spomky-labs/cbor-php/CODE_OF_CONDUCT.md
find vendor/tecnickcom/tcpdf/fonts/ -maxdepth 1 -type f \
-not -name 'dejavusans.*' \
-not -name 'dejavusansb.*' \

View File

@ -54,7 +54,7 @@
"sass": "1.78.0",
"sass-loader": "^13.2.2",
"tablesorter": "^2.31.3",
"tracekit": "0.4.7",
"tracekit": "0.4.9",
"ts-loader": "^9.4.2",
"typescript": "~5.3.2",
"u2f-api-polyfill": "0.4.4",

View File

@ -634,6 +634,11 @@ const addTableToTablesList = function (index, tableDom) {
*/
const displayModal = function (form, heading, type) {
var modal = $(type);
modal.one('hidden.bs.modal', function () {
modal.find('*').off('click'); // Unregister all click events when the modal is hidden
});
modal.modal('show');
modal.find('.modal-body').first().html(form);
$(type + 'Label').first().html(heading);
@ -700,7 +705,6 @@ const addOtherDbTables = function () {
}
});
$('#designerModalGoButton').off('click');// Unregister the event for other modals to not call this one
modal.modal('hide');
});
@ -882,7 +886,6 @@ const save3 = function (callback = undefined) {
var $form = $('#save_page');
$form.trigger('submit');
$('#designerModalGoButton').off('click');// Unregister the event for other modals to not call this one
modal.modal('hide');
});
}
@ -919,7 +922,6 @@ const editPages = function () {
return;
}
$('#designerModalGoButton').off('click');// Unregister the event for other modals to not call this one
modal.modal('hide');
DesignerMove.loadPage(selected);
});
@ -990,7 +992,6 @@ const deletePages = function () {
});
}
$('#designerModalGoButton').off('click');// Unregister the event for other modals to not call this one
modal.modal('hide');
});
}
@ -1084,7 +1085,6 @@ const saveAs = function () {
}
}
$('#designerModalGoButton').off('click');// Unregister the event for other modals to not call this one
modal.modal('hide');
});
@ -1154,7 +1154,6 @@ const exportPages = function () {
var modal = DesignerMove.displayModal($form, window.Messages.strExportRelationalSchema, '#designerGoModal');
$('#designerModalGoButton').on('click', function () {
$('#id_export_pages').trigger('submit');
$('#designerModalGoButton').off('click');// Unregister the event for other modals to not call this one
modal.modal('hide');
});
}

View File

@ -1176,7 +1176,7 @@ var ConsoleDebug = {
initialize: function () {
// Try to get debug info after every AJAX request
$(document).on('ajaxSuccess', function (event, xhr, settings, data) {
if (data.debug) {
if (typeof data !== 'undefined' && data.debug) {
ConsoleDebug.showLog(data.debug, settings.url);
}
});

View File

@ -13,7 +13,7 @@ export default function updateNavigationWidthConfig (value: number): void {
value: value,
},
success: function (data) {
if (data.success !== true) {
if (typeof data !== 'undefined' && data.success !== true) {
// Try to find a message to display
if (data.error || data.message) {
ajaxShowMessage(data.error || data.message);

View File

@ -43,9 +43,9 @@
{{ get_icon('b_saveimage', t('Save')) }}
</button>
<ul class="dropdown-menu" aria-labelledby="saveImageButton">
<li><a class="dropdown-item disableAjax" href="{{ download_url|raw }}&fileFormat=png">PNG</a></li>
<li><a class="dropdown-item disableAjax" href="{{ download_url|raw }}&fileFormat=pdf">PDF</a></li>
<li><a class="dropdown-item disableAjax" href="{{ download_url|raw }}&fileFormat=svg">SVG</a></li>
{% for fileType in download_options %}
<li><a class="dropdown-item disableAjax" download href="{{ download_url|raw }}&amp;fileFormat={{ fileType }}">{{ fileType|upper }}</a></li>
{% endfor %}
</ul>
</div>
</div>

View File

@ -27,6 +27,7 @@ use PhpMyAdmin\SqlParser\Statements\SelectStatement;
use PhpMyAdmin\Template;
use PhpMyAdmin\Url;
use PhpMyAdmin\UrlParams;
use TCPDF;
use function __;
use function array_search;
@ -106,6 +107,8 @@ final readonly class GisVisualizationController implements InvocableController
$visualization = GisVisualization::get($sqlQuery, $visualizationSettings, $rows, $pos);
$downloadOptions = $this->getDownloadOptions();
if (isset($_GET['saveToFile'])) {
$response = $this->responseFactory->createResponse();
$filename = $visualization->getSpatialColumn();
@ -153,6 +156,7 @@ final readonly class GisVisualizationController implements InvocableController
'useBaseLayer' => $useBaseLayer,
'visualization' => $visualization->asSVG(),
'open_layers_data' => $visualization->asOl(),
'download_options' => $downloadOptions,
]);
$this->response->addHTML($html);
@ -160,6 +164,23 @@ final readonly class GisVisualizationController implements InvocableController
return $this->response->response();
}
/** @return list<'svg'|'png'|'pdf'> */
private function getDownloadOptions(): array
{
$downloadOptions = [];
if (class_exists(TCPDF::class)) {
$downloadOptions[] = 'pdf';
}
if (extension_loaded('gd')) {
$downloadOptions[] = 'png';
}
$downloadOptions[] = 'svg';
return $downloadOptions;
}
/**
* Reads the sql query from POST or GET
*

View File

@ -106,7 +106,7 @@ final class MysqliResult implements ResultInterface
/**
* Returns all rows of the result
*
* @return array<array<string|null>>
* @return array<int, array<string|null>>
* @psalm-return list<array<array-key, string|null>>
*/
public function fetchAllAssoc(): array

View File

@ -237,6 +237,8 @@ class Normalization
. '</div><div class="card-footer"></div>'
. '</div>';
$html .= $this->template->render('modals/index_dialog_modal');
return $html;
}

View File

@ -5398,10 +5398,10 @@ tr46@^3.0.0:
dependencies:
punycode "^2.1.1"
tracekit@0.4.7:
version "0.4.7"
resolved "https://registry.yarnpkg.com/tracekit/-/tracekit-0.4.7.tgz#64a5ab60ed3f0470208186fdaf4053285b345e15"
integrity sha512-d3BLRambfZ0VOYLIh7FRSElugsOMrNgxzT4jXyOXC7lnhoeEJIHNg8VAcpKVVmu9kREGUAVg8Eh3SlRfkU/ksQ==
tracekit@0.4.9:
version "0.4.9"
resolved "https://registry.yarnpkg.com/tracekit/-/tracekit-0.4.9.tgz#aa861fcf708529839065529d16ed15040b3c43dd"
integrity sha512-t0FLQeE8F5PQiyyGsdynxWBSNyYA3IxtdDEqviYQAJmFwNMRxy0tIVGJsqBzbstG8FQvgJ4PehLdqjCHffsggQ==
trim-newlines@^4.0.2:
version "4.1.1"