Commit Graph

359 Commits

Author SHA1 Message Date
Kamil Tekiela
ade85420a8 Inline runQueryPost()
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

import
2022-03-17 20:45:31 +00:00
Maurício Meneghini Fauth
9faaad41ac
Fix export not working
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-03-15 17:12:37 -03:00
Maurício Meneghini Fauth
f940693c75
Move Util::checkParameters method to the AbstractController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-03-07 22:59:33 -03:00
Maurício Meneghini Fauth
1438cb211e
Replace global keyword with $GLOBALS
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-03-07 17:31:11 -03:00
Maurício Meneghini Fauth
9b5b210fc4
Remove action global var from ColumnsDefinition class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-03-03 17:41:52 -03:00
Maurício Meneghini Fauth
c0eb02d7d3
Extract ColumnsDefinition construction from controllers
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-03-02 18:59:27 -03:00
Maurício Meneghini Fauth
48fbce3ca3
Add basic test for Table\AddFieldController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-28 15:10:12 -03:00
Maurício Meneghini Fauth
1c66f554ab
Add basic test for Table\ChangeController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-28 13:55:23 -03:00
Maurício Meneghini Fauth
5bc129d7c1
Add unit tests for Table\ChangeRowsController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-28 13:19:44 -03:00
Maurício Meneghini Fauth
3a51491d8f
Add basic test for Table\ChartController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-27 12:16:23 -03:00
Maurício Meneghini Fauth
9facf6524c
Add basic test for Table\CreateController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-27 11:15:11 -03:00
Maurício Meneghini Fauth
0b37a84f79
Fix Table/DeleteConfirmControllerTest db name
Introduced by 49a39313c2.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-27 09:57:28 -03:00
Maurício Meneghini Fauth
49a39313c2
Add basic test for Table\DeleteConfirmController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-26 08:52:42 -03:00
Maurício Meneghini Fauth
40135c26cc
Add basic test for Table\DeleteRowsController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-25 16:44:49 -03:00
Maurício Meneghini Fauth
9ebb17dd50
Add basic test for Table\DropColumnConfirmationController
Fixes 476a80c277

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-25 16:02:06 -03:00
Maurício Meneghini Fauth
476a80c277
Add basic test for Table\DropColumnConfirmationController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-25 16:00:18 -03:00
Maurício Meneghini Fauth
60f75803e8
Add basic test for Table\DropColumnController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-24 22:29:22 -03:00
Maurício Meneghini Fauth
e1dc022d33
Add basic test for Table\Structure\SaveController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-24 18:53:58 -03:00
Maurício Meneghini Fauth
c3acdeeb16
Add basic test for Table\ExportController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-24 16:52:27 -03:00
Maurício Meneghini Fauth
6d2246f912
Add unit tests for Table\ExportRowsController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-24 15:35:26 -03:00
Maurício Meneghini Fauth
81cfa99df4
Move Advisor class to PhpMyAdmin\Advisory namespace
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-24 13:16:19 -03:00
Maurício Meneghini Fauth
687a83923a
Add basic test for Table\GetFieldController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-24 12:54:43 -03:00
Maurício Meneghini Fauth
cfc64619bf
Fix Table\ImportControllerTest failing test
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-24 11:48:22 -03:00
Maurício Meneghini Fauth
055c878bae
Add basic test for Table\GisVisualizationController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-23 21:50:22 -03:00
Maurício Meneghini Fauth
4c8691b6dd
Add basic test for Table\ImportController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-23 20:19:23 -03:00
Maurício Meneghini Fauth
65fe3c5ff8
Fix RecentFavoriteControllerTest failing test
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-22 19:24:13 -03:00
Maurício Meneghini Fauth
572c811b08
Add basic test for Table\IndexRenameController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-22 19:17:33 -03:00
Maurício Meneghini Fauth
c7b2c83780
Add unit tests for Table\RecentFavoriteController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-22 17:57:33 -03:00
Maurício Meneghini Fauth
c8cd855fc8
Add basic test for Table\SqlController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-22 14:45:35 -03:00
Maurício Meneghini Fauth
99b0604739
Add basic test for Table\StructureController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-21 21:54:42 -03:00
Maurício Meneghini Fauth
5cb9b2702d
Add basic test for Table\TrackingController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-21 17:49:57 -03:00
Maurício Meneghini Fauth
1947be477b
Add basic test for Table\TriggersController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-21 16:45:43 -03:00
Maurício Meneghini Fauth
1b8b9bf4ea
Add basic test for Table\ZoomSearchController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-21 16:02:34 -03:00
Maurício Meneghini Fauth
a0337bf220
Refactor JavaScriptMessagesController controller
- Removes the dependency of the cfg and theme PHP globals.
- Handles the errors when encoding the messages to JSON.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-14 18:09:57 -03:00
Maurício Meneghini Fauth
5a34a3bb04
Remove db and table properties from controllers
Replaces them with their respective globals.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-02 14:48:43 -03:00
Shucon Tech
745c39bf9c
Replace function Confirm dialog with modal (#17115)
* Replace function Confirm dialog with modal

Signed-off-by: Saksham Gupta <shucontech@gmail.com>

* Fix failing tests

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>

Co-authored-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-01-28 21:54:14 -03:00
Maurício Meneghini Fauth
b3104dfa6d
Add basic test for Server\PrivilegesController class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-01-28 14:23:54 -03:00
Kamil Tekiela
f38d3baa31 Remove $options parameter from fetchResult
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-01-01 01:46:17 +00:00
Kamil Tekiela
47a039d70c Implement ResultInterface & MysqliResult
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-31 23:59:24 +00:00
Maurício Meneghini Fauth
2d56a8baac
Move Import and ImportStatus ctrls to Controllers\Import ns
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-27 10:27:28 -03:00
Maurício Meneghini Fauth
44fe103b9c
Remove @access annotations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-22 11:43:45 -03:00
Maurício Meneghini Fauth
fa5c684f27
Replace the master/slave terminology
Replaces master with primary and slave with replica.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-18 14:26:56 -03:00
Maurício Meneghini Fauth
bf49480160
Populate relation Session with RelationParameters class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-17 12:09:15 -03:00
Maurício Meneghini Fauth
aaee7961c1
Remove Template dependency from Relation class
Related to 2299a62e49.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-17 12:09:14 -03:00
Maurício Meneghini Fauth
c411121fd8
Move Relation classes into the ConfigStorage namespace
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-17 12:09:13 -03:00
Maurício Meneghini Fauth
2299a62e49
Extract HTML from Relation::getRelationsParamDiagnostic
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-05 16:44:29 -03:00
Maurício Meneghini Fauth
e936cad542
Add basic test for Table\OperationsController class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-01 11:47:19 -03:00
Maurício Meneghini Fauth
2c125f0a87
Add basic unit test for Export\ExportController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-30 16:15:48 -03:00
Kamil Tekiela
51f4017b32
Refactor destroy controller (#17194)
* Remove redundant conditions

They were always true. First, the variable is set to -1.
If the variable is -1, then set it to Message.
If the variable is Message then set the JSON array. All of this is
redundant.

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* $sqlQuery is not used anywhere

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Enforce $selected to be an array

I can't remove it as it is a global. Previously, it was set to a POST
variable. Since we validate that the variable is set and is not null,
we can use the value from $params. If we validate that it's also an
array we can replace for loop with foreach.
There is no passing by reference, so this change should be safe.

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Replace $rebuildDatabaseList with input validation

The validation message says 'No databases selected.' so I assume that
we should check that we actually got at least one entry in the list.
If that is true, then the $rebuildDatabaseList is not needed and the
condition redundant.

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* drop_selected_dbs is always set and is redundant

I am not sure if this is necessary. The AJAX request sends a value of "1"
but the code doesn't really do anything with it other than checking if
it is actually set. Is there some other path possible?

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Flatten the array with a single element

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Remove redundant isset

The variable is set, so !isset === is_null. Why check for null if we can
check just for !is_array.

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Update psalm-baseline.xml

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Adhere to the coding standard

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-11-19 14:26:04 -03:00
Maurício Meneghini Fauth
b2a51c4d84
Create the RelationParameters value object
Replaces the $cfgRelation array with the RelationParameters value
object.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-14 18:22:36 -03:00