Kamil Tekiela
9800c3574f
Move urlParamsInEditMode to ChangeController
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-04-20 16:53:18 +01:00
Kamil Tekiela
0bb63c997f
Remove getWhereClauseArray()
...
This weird array cast is not adding anything useful. The psalm type hint tells us that elements are strings, but that's not guaranteed in any way.
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-04-20 16:53:18 +01:00
Kamil Tekiela
a2a35c19de
Split up loadFirstRow
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-04-20 16:53:18 +01:00
Kamil Tekiela
69c389e0ec
Fix bug #18329 ( #18331 )
...
* Refactor getSpecialCharsAndBackupFieldForInsertingMode
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Add null guard
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Tidy up some mess
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
---------
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-04-12 16:02:42 -03:00
Maurício Meneghini Fauth
514ed287c6
Merge pull request #18328 from MoonE/fieldmetadata
...
Refactor DbiDummy and improve FieldMetadata
2023-04-12 14:13:20 -03:00
Maurício Meneghini Fauth
e104f66d97
Merge branch 'QA_5_2'
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-04-11 15:46:30 -03:00
Maximilian Krög
abf49ce9d4
Bettery types for DbiDummy / DummyResult
...
Signed-off-by: Maximilian Krög <maxi_kroeg@web.de>
2023-04-07 21:47:07 +02:00
Maximilian Krög
3228a19c2d
Improve FieldMetadata
...
Signed-off-by: Maximilian Krög <maxi_kroeg@web.de>
2023-04-07 21:46:19 +02:00
Maurício Meneghini Fauth
dd885dc7b8
Use single-line arrays when possible
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-03-27 17:39:17 -03:00
Maurício Meneghini Fauth
e5698c85e9
Require single line for function calls
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-03-26 23:10:10 -03:00
Maurício Meneghini Fauth
437215cab2
Rename variables to use camel case format
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-03-26 21:47:50 -03:00
Kamil Tekiela
3ecf14df34
Fixing erroneous params
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-03-17 12:47:43 +00:00
Maximilian Krög
89bcefeadb
Fix inserting gis-data via insert/edit form
...
Signed-off-by: Maximilian Krög <maxi_kroeg@web.de>
2023-03-01 22:40:09 +01:00
Kamil Tekiela
276577ca2a
Remove $GLOBALS['PMA_PHP_SELF'] ( #18149 )
...
* Remove $GLOBALS['PMA_PHP_SELF']
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Remove $GLOBALS['PMA_PHP_SELF'] from tests
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Moved cleanupPathInfo to Routing
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Remove parse_url from getRootPath
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Update baselines
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Remove invalid tests
Surely, we never expect PATH to be backslash delimited. The code is not designed to handle this and the tests for this don't make much sense.
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Fix trailing slash in path
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
---------
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-27 17:56:27 -03:00
Maurício Meneghini Fauth
f9c8035768
Add native parameter types to test classes
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-27 01:54:03 -03:00
Maurício Meneghini Fauth
16a0660a78
Add native property types to test classes
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-27 01:17:22 -03:00
Maurício Meneghini Fauth
b07f039578
Add missing native return types
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-24 21:22:24 -03:00
Maurício Meneghini Fauth
556594b4cd
Fix coding standard spacing issues
...
- Fixes one line doc comments
- Fixes parent call spacing
- Fixes constant spacing
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-24 21:06:17 -03:00
Maurício Meneghini Fauth
77957a69a5
Add trailing comma for multi-line functions
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-24 20:48:46 -03:00
Maurício Meneghini Fauth
bfd5db406d
Improve array type inference for some tests
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-23 17:02:54 -03:00
Maurício Meneghini Fauth
cb67fa306d
Remove Reflection's setAccessible() method
...
This method is no-op since PHP 8.1.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-21 20:35:45 -03:00
Kamil Tekiela
cfe54a501b
Add union types
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-15 15:23:28 +00:00
Maurício Meneghini Fauth
0ab9e4ac77
Change PHPUnit data providers to use static methods
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-14 12:42:16 -03:00
Maurício Meneghini Fauth
0819043d0e
Merge branch 'QA_5_2'
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-08 14:09:59 -03:00
William Desportes
b9c593c67d
Fix #17766 - Allow to open in a new tab copy and edit row actions
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2022-11-25 19:55:53 +01:00
Mo Sureerat
e2e92c6899
[ISSUE-17793] Fix lint check fail
...
Signed-off-by: Mo Sureerat <sureemo@gmail.com>
2022-11-03 23:08:03 +07:00
Mo Sureerat
15e629c9c1
[ISSUE-17793] UUID - Fix insert error
...
Signed-off-by: Mo Sureerat <sureemo@gmail.com>
2022-11-03 05:55:37 +07:00
Mo Sureerat
ddf928e6f3
[ISSUE-17793] Revert previous change + Fix default selection of uuid in alter table
...
Signed-off-by: Mo Sureerat <sureemo@gmail.com>
2022-11-03 05:25:14 +07:00
Mo Sureerat
f8bee4cd5d
[ISSUE-17793] Insert record - fix null not selected if nullable UUID + insert error
...
Signed-off-by: Mo Sureerat <sureemo@gmail.com>
2022-11-03 05:25:04 +07:00
Mo Sureerat
afd568e889
[ISSUE-17793] Revert previous change + Fix default selection of uuid in alter table
...
Signed-off-by: Mo Sureerat <sureemo@gmail.com>
2022-11-03 05:11:19 +07:00
Mo Sureerat
7615c7e780
[ISSUE-17793] Insert record - fix null not selected if nullable UUID + insert error
...
Signed-off-by: Mo Sureerat <sureemo@gmail.com>
2022-11-03 03:01:38 +07:00
William Desportes
47213b8819
Fix tests for pull-request #17797
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2022-10-26 14:03:54 +02:00
William Desportes
25c13d667b
Merge branch 'QA_5_2'
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2022-10-26 12:22:38 +02:00
Mo Sureerat
aeab8a1c41
Fix #17793 - insert UUID ( #17797 )
...
* Add/Change table schema - Add UUID in default options
* Insert/Update - Generate uuid only not defined and not check null option
* Add/Change table schema - Hide UUID from default options if database not support & add unit test
Fix #17793
Signed-off-by: Mo Sureerat <sureemo@gmail.com>
2022-10-20 15:57:53 -03:00
Maurício Meneghini Fauth
b054d0091e
Merge pull request #17807 from kamil-tekiela/table-dbi
...
Pass $dbi as argument to Table
2022-10-18 11:08:36 -03:00
Kamil Tekiela
2c416128e5
Pass as argument to Table
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-10-17 22:30:33 +01:00
Kamil Tekiela
f2a83311ae
Simplify onchange in InsertEdit.php
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-10-17 21:28:57 +01:00
William Desportes
f74c9a21fe
Fix InsertEditTest after pull-request #17767
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2022-10-14 21:00:20 +02:00
William Desportes
6da193304f
Merge branch 'QA_5_2'
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2022-10-13 20:13:48 +02:00
Mo Sureerat
cac09436c9
Rewrite method to set database info
...
Signed-off-by: Mo Sureerat <sureemo@gmail.com>
2022-10-11 13:01:19 +07:00
Mo Sureerat
8c93351647
Relocate method and fix unit test fail
...
Signed-off-by: Mo Sureerat <sureemo@gmail.com>
2022-10-11 01:18:52 +07:00
Mo Sureerat
033a4cb099
Update unit test - Exclude UUID if not supported database version
...
Signed-off-by: Mo Sureerat <sureemo@gmail.com>
2022-10-10 22:51:44 +07:00
Jesper Skytte Marcussen
23995b3c73
Adding inputmode numeric to integer fields ( #17753 )
...
* Adding inputmode numeric to integer fields
To easier use phpMyAdmin on touch devices with virtual keyboards, adding the inputmode ensures that the correct virtual keyboard is shown per default when focusing the field.
See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode for more information.
Related to #17745 .
Signed-off-by: Jesper Skytte <jesper@skytte.it>
2022-10-09 15:26:32 -03:00
Kamil Tekiela
f7f8722e1f
Refactor insert edit ( #17684 )
...
This is a major redesign of the code that handles these four actions: in-place edit(AJAX), edit of multiple rows, copying of rows, and insertion of new rows. The goal is to make the code easier to read and more understandable.
I introduced a new DTO for better readability.
Some of the methods were made private to the model
The controller has access to two methods for getting the value for INSERT and for UPDATE
Unfortunately, I have introduced method envy on EditField, but I do not want to move the functionality away from InsertEdit.php
Unit tests have not improved in readability but I added helpful comments explaining what we are testing. There's probably a way to improve it too.
I will probably merge all commits once I decide it's ready for review.
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-08-22 22:39:53 -03:00
Maurício Meneghini Fauth
0b2ab57ea2
Merge branch 'QA_5_2'
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-08-19 00:31:22 -03:00
Kamil Tekiela
fc932a9a8f
Allow fields to be set to NULL
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-08-15 14:35:21 +01:00
Maurício Meneghini Fauth
f57ea10921
Merge branch 'QA_5_2'
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-08-12 21:13:24 -03:00
Kamil Tekiela
06d58c9662
Fix bug #17663
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-08-08 14:41:51 +01:00
Kamil Tekiela
1e70bba883
Fix bug not allowing insertion of set values
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-08-08 14:33:50 +01:00
Maurício Meneghini Fauth
63d57b1f1c
Push dbi and dummyDbi members down
...
The idea is to only load the DBI when needed.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-07-13 00:15:53 -03:00