1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-25 06:39:48 +03:00
Commit Graph

322 Commits

Author SHA1 Message Date
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
Maurício Meneghini Fauth
67e96cf40c Get default config values from Config\Settings classes
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-30 12:04:47 -03:00
Maurício Meneghini Fauth
3e0856c77b Remove useless string concatenations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-27 21:40:22 -03:00
Maurício Meneghini Fauth
f00d70cccb Remove useless whitespaces
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-15 17:05:40 -03:00
Maurício Meneghini Fauth
bfaf16f56b Use only callable controllers
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-11 15:20:46 -03:00
Maurício Meneghini Fauth
00cb1b3668 Extract IndexesController::doSaveData method
Creates the Table\Indexes class.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-11 14:38:44 -03:00
Maurício Meneghini Fauth
83091680cc Extract actions from controllers to new controllers
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-10 17:55:05 -03:00
Maurício Meneghini Fauth
38fda677bd Extract Processes class from ProcessesController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-10 15:52:48 -03:00
Maurício Meneghini Fauth
94e714a49b Extract the Server\ShowEngineController class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-09 17:58:00 -03:00
Maurício Meneghini Fauth
fb257e5922 Extract actions from Table\StructureController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-09 13:48:07 -03:00
Maurício Meneghini Fauth
e3554879ef Extract actions from controllers to new controllers
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-07 21:19:43 -03:00
Maurício Meneghini Fauth
96adfe37f4 Extract actions from controllers to new ctrls
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-06 18:30:21 -03:00
Maurício Meneghini Fauth
e5e7bd2f95 Access POST params from the ServerRequest class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-01 12:52:59 -03:00
Maurício Meneghini Fauth
a2ed4dfe68 Make controllers callable
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-08-30 13:16:29 -03:00
William Desportes
2c28a715b4 Add methods to DbiDummy and AbstractTestCase to control changing databases
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-08-24 02:01:00 +02:00
William Desportes
b72f941167 Merge branch 'QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-08-23 20:35:42 +02:00
Lukas Bixen
02f87d85fc Fix SqlControllerTest after PR #17068
Signed-off-by: Lukas Bixen <lrb2_@outlook.com>
2021-08-23 10:46:58 -05:00
Maurício Meneghini Fauth
f7fc4177af Add support for account locking
- https://dev.mysql.com/doc/refman/en/account-locking.html
- https://mariadb.com/kb/en/account-locking/

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-08-21 00:55:33 -03:00
Maurício Meneghini Fauth
ab1ad45f95 Fix NavigationControllerTest failing test
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-08-01 14:20:44 -03:00
William Desportes
8b13de9794 Fix tests after #16937
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-28 01:42:04 +02:00
William Desportes
23b794e41b Fix @covers annotations
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-27 03:15:28 +02:00
William Desportes
cef66ddc19 Merge branch 'QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-27 02:59:31 +02:00
William Desportes
10df7c408e Fix #16398 - Quote non numeric values on parameterized queries
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-27 02:43:18 +02:00
William Desportes
a92a9c2a9d Add a test for #16398
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-27 02:35:07 +02:00
Liviu-Mihail Concioiu
010750b00d Fix table width
Signed-off-by: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com>
2021-07-22 01:05:18 +02:00
William Desportes
a57634bbd0 Fix failing test NavigationControllerTest
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-20 19:28:27 +02:00
William Desportes
3a87667cab Merge branch 'QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-20 17:52:16 +02:00
William Desportes
a5f83dc369 Add tests for #16973
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-20 15:44:49 +02:00
William Desportes
8f77a9f29d Ref #15247 - Remove defined('TESTSUITE') from ReplaceController and remove an exit
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-15 02:39:14 +02:00
William Desportes
f0db5fb57e Add tests for Mroonga support
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-11 21:54:36 +02:00
Maurício Meneghini Fauth
355f6d9d20 Remove PhpMyAdmin\Config::enableBc method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-09 13:59:04 -03:00
Maurício Meneghini Fauth
10b3ead050 Remove invalid covers annotations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-05 16:29:31 -03:00
Maurício Meneghini Fauth
27a5792976 Add PhpMyAdmin\Http\ServerRequest class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-04 15:48:23 -03:00
Maurício Meneghini Fauth
6f894e7ea7 Add support for PSR-7 request objects in controllers
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-03 18:54:42 -03:00
Maurício Meneghini Fauth
9adaa912e1 Rename Response class to ResponseRenderer
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-06-30 12:35:22 -03:00
William Desportes
0a1f083990 Merge branch 'QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-06-23 20:36:21 +02:00
William Desportes
c3e0555e8b Add security tests for #16977
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-06-23 19:06:49 +02:00
William Desportes
b801a7e8cb Ref #16871 - Fix - Invert expected and actual on NormalizationControllerTest and add assert response success
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-06-23 19:01:50 +02:00