Maurício Meneghini Fauth
ca489f3b41
Improve type of DatabaseInterface::getLowerCaseNames()
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-19 15:50:14 -03:00
Maurício Meneghini Fauth
d0d90551c3
Remove the dblist global variable
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-13 21:08:00 -03:00
Maurício Meneghini Fauth
5df50f6a11
Refactor Tracking export download to remove exit
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-10 16:18:26 -03:00
Tobias Speicher
0f215ed0f6
Fix broken single column change page introduced by #17862
...
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-11-09 11:06:02 +01:00
Maurício Meneghini Fauth
a0e4afff04
Replace $_POST with ServerRequest object in Table\OperationsController
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-09 02:11:16 -03:00
Maurício Meneghini Fauth
2cc3bf4778
Merge pull request #17881 from kamil-tekiela/Refactor-PrimaryController.php
...
Redesign PrimaryController
2022-11-08 22:26:31 -03:00
Maurício Meneghini Fauth
f103bdc1e2
Replace $_REQUEST with ServerRequest in Util::getDbInfo()
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-08 00:06:25 -03:00
Maurício Meneghini Fauth
97aac39a40
Remove the sub_part global variable
...
It's only used inside Util::getDbInfo() for pagination when not
exporting.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-07 22:06:59 -03:00
Kamil Tekiela
ba41957e5f
Redesign PrimaryController
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-11-08 00:31:47 +00:00
Maurício Meneghini Fauth
a1c8769fab
Refactor $dateFrom and $dateTo to use DateTimeImmutable
...
Uses the DateTimeImmutable object to validate the datetime values of the
$dateFrom and $dateTo variables in the Tracking class.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-07 16:50:18 -03:00
Maurício Meneghini Fauth
d9fcd3555b
Remove filter_ts_* global variables
...
Replaces them with $dateFrom and $dateTo variables.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-07 16:03:22 -03:00
Maurício Meneghini Fauth
17d9855420
Remove $_POST variables from Table\TrackingController
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-06 14:25:09 -03:00
Maurício Meneghini Fauth
4044c3bc3c
Remove unnecessary global variable 'data'
...
Replaces it with a regular varible.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-06 13:22:46 -03:00
Maurício Meneghini Fauth
789a7e441d
Remove usage of $_POST['logtype']
...
- Replaces with variable get from ServerRequest object
- Renames it log_type for readability
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-06 11:45:07 -03:00
Maurício Meneghini Fauth
0f2ff29d9d
Remove tracking's selection_* global variables
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-05 17:24:18 -03:00
Maurício Meneghini Fauth
db75ac370d
Add method to validate logtype request param
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-05 16:46:48 -03:00
Maurício Meneghini Fauth
0cc6340d29
Fix error after #17819 merge
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-05 15:37:45 -03:00
Kamil Tekiela
959849f446
Introduce ServerRequest::hasBodyParam() ( #17870 )
...
* Drop Sql::setUiProp()
* Remove ternary operator
* Improve array guard
* Remove redundant isset
* Implement hasBodyParam()
* Add has() and hasQueryParam()
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-11-05 13:04:45 -03:00
Kamil Tekiela
b3d97a47ef
Refactor ChangeController and use ServerRequest
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-11-02 21:57:31 +00:00
Maurício Meneghini Fauth
66e2650e06
Replace Core::fatalError() calls in controllers
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-10-31 20:25:55 -03:00
Maurício Meneghini Fauth
4bd3a1c423
Fix some issues and update SA baselines
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-10-29 17:27:51 -03:00
Luca Perna
4540d6ead0
Ref #16276 - Reduce the usage of SuperGlobals in Tracking and UserPassword ( #17820 )
...
* 16276 - Reduce the usage of SuperGlobals in Tracking and UserPassword
Signed-off-by: Luca Perna <luca@perna.rocks>
* 16276 - minor code style refactorings
Signed-off-by: Luca Perna <luca@perna.rocks>
Signed-off-by: Luca Perna <luca@perna.rocks>
Co-authored-by: Luca Perna <luca@perna.rocks>
2022-10-29 13:24:19 -03:00
Luca Perna
cca381a415
#17769 Use ServerRequest Object to access POST-vars ( #17819 )
...
* 17769 - use Request object instead of SuperGlobals
Signed-off-by: Luca Perna <luca@perna.rocks>
2022-10-29 11:57:47 -03:00
Umang Patel
fdb5528648
Use Database type instead of string ( #17746 )
...
* Refactored tryColumnCreationQuery function inside CreateAddField to use DatabaseName type instead of string
* Refactored exportDatabase and lockTables function to use DatabaseName type instead of string for database name
Signed-off-by: Umang Patel <umang.patel@healthengine.com.au>
Co-authored-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-10-20 21:34:10 -03:00
Luca Perna
d1b5cb6987
16276 - Reduce the usage of SuperGlobals ( #17795 )
...
Signed-off-by: Luca Perna <luca@perna.rocks>
2022-10-20 01:52:38 -03:00
Sebastian Walther
edfe8a5881
Replace POST-var access with Serverrequest object - pt 2 ( #17787 )
...
* Use ServerRequestObject to access POST-vars
Signed-off-by: Sebastian Walther <swalther@complex-it.de>
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Co-authored-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-10-19 22:06:35 -03:00
Maurício Meneghini Fauth
1bf0abdbb7
Merge pull request #17810 from kamil-tekiela/triggers-and-routines
...
Triggers and routines should be a dependency
2022-10-18 11:10:30 -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
3e5f101d6f
Make Triggers a dependency
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-10-18 13:53:14 +01:00
Maurício Meneghini Fauth
0f57dfff5b
Merge pull request #17800 from kamil-tekiela/Fix-phpstan-issues-2
...
Fix PHPStan issues 2
2022-10-17 20:32:59 -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
Bhuvi100
9a3090ef75
Make search input field types match columns types (integer and float) ( #17765 )
...
This PR adds type attribute as well as inputmode attribute to search value input fields which makes it easier for validation as well as for using phpMyAdmin on touch devices with virtual keyboards.
Fixes #17745
Signed-off-by: Bhuvanesh T G <gbhuvanesh100@gmail.com>
Co-authored-by: William Desportes <williamdes@wdes.fr>
2022-10-17 15:41:51 -03:00
Kamil Tekiela
0ca6b456d5
Casting to int something that's already int
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-10-15 20:15:50 +01:00
Kamil Tekiela
594454eff2
Replace for loop with foreach
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-10-14 20:42:42 +01:00
Maurício Meneghini Fauth
4bda7899ab
Fix coding standard issues after #17794 merge
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-10-14 08:44:52 -03:00
Luca Perna
40adf927c5
Move superglobals access to controllers ( #17794 )
...
Related to #16276
Signed-off-by: Luca Perna <luca@perna.rocks>
2022-10-14 08:34:42 -03:00
Maurício Meneghini Fauth
135cd76d3b
Fix exception for invalid db and table names for the privileges page
...
Related to #17729
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-09-30 20:49:21 -03:00
Solomon Okunuga
0f9c79ebed
Issue #17727 Started refactoring uses of $db and $table ( #17729 )
...
* Issue #17727 Started refactoring uses of $db and $table to use the Objects -
DatabaseName and TableName
Changed uses related to Privileges
Signed-off-by: Solomon Okunuga <soloistic1@gmail.com>
* Apply suggestions from code review
Co-authored-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Signed-off-by: Solomon Okunuga <soloistic1@gmail.com>
Co-authored-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-09-30 19:33:36 -03:00
Maurício Meneghini Fauth
bb97ed988f
Reduce usage of the containerBuilder global variable
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-09-29 22:36:46 -03:00
Maurício Meneghini Fauth
2076d52480
Merge branch 'QA_5_2'
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-09-19 23:26:15 -03:00
William Desportes
6230c197dd
Fix PHP warning on GIS visualization when there is only one GIS column
...
```
Warning in ./libraries/classes/Controllers/Table/GisVisualizationController.php#174
Undefined array key "labelColumn"
Backtrace
Routing.php#191: PhpMyAdmin\Controllers\Table\GisVisualizationController->__invoke(
,
array,
)
./../../../../index.php#43: PhpMyAdmin\Routing::callControllerForRoute(
,
string '/table/gis-visualization',
,
,
)
```
Structure:
- A table with only one GIS column
Signed-off-by: William Desportes <williamdes@wdes.fr>
2022-09-10 14:05:34 +02:00
Maurício Meneghini Fauth
d6b72de8aa
Improve return type of Index::getPrimary method
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-09-07 23:25:20 -03:00
Maurício Meneghini Fauth
9d2350d28c
Extract dbi global variable from Index::loadIndexes
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-09-07 21:59:03 -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
a2ef27823e
Merge pull request #17688 from kamil-tekiela/Fix-table-creation
...
Fix table creation
Fixes #17544
2022-08-18 22:54:53 -03:00
Kamil Tekiela
d14e334176
Update psalm-baseline.xml
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-08-17 21:20:50 +01:00
Kamil Tekiela
2e126d7f65
Fix table creation
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-08-17 20:31:51 +01:00
Kamil Tekiela
0944221868
Extract moveBackToCallingScript
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-08-17 19:21:33 +01:00
Kamil Tekiela
6d91494935
Extract doTransformations
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-08-17 19:21:33 +01:00