Commit Graph

181 Commits

Author SHA1 Message Date
Maurício Meneghini Fauth
4ff3724c3f
Use union with null instead of short nullable type
Since union type are now possible, using union with null makes more
clear that it is a union type.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-20 21:48:19 -03:00
Maurício Meneghini Fauth
785f8c1c00
Use constructor property promotion where possible
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-20 19:39:02 -03:00
Maurício Meneghini Fauth
613678f8f5
Replace assignments with null coalesce equal operator
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-20 17:03:05 -03:00
Kamil Tekiela
8a1d6f1eaa Convert var annotations to typed properties
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-12 21:31:04 +00:00
Kamil Tekiela
d76b240176 Remove redundant pass-by-ref
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-10 16:30:12 -03:00
Kamil Tekiela
6735938f12 Remove dependancy in Table/StructureController
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-12-16 20:58:48 +00:00
Maurício Meneghini Fauth
49865fe647
Remove Indexes object from the Window global object
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-29 14:39:16 -03: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
Maurício Meneghini Fauth
eb3703882b
Move Routing::getCurrentRoute to ServerRequest
The route is retrieved from the request, so it makes sense to move the
method to the Http\ServerRequest class.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-06-06 23:36:57 -03:00
Maurício Meneghini Fauth
5950693fb3
Fix possible undefined globals
Related to https://github.com/phpmyadmin/phpmyadmin/pull/17427.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-03-10 18:05:21 -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
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
Maurício Meneghini Fauth
8529de4d88
Merge pull request #17303 from kamil-tekiela/Remove-globals
Remove globals
2022-01-28 16:47:16 -03:00
Maurício Meneghini Fauth
a8d514a350
Remove db and table globals from DbTableExists class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-01-28 16:43:48 -03:00
Kamil Tekiela
47e81a5161 Remove $route global
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-01-27 11:47:40 +00:00
Maurício Meneghini Fauth
d84af02945
Create VO classes for each RelationParameters features
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-26 19:17:58 -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
c4575fd48b
Add methods to check for RelationParameters features
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-11 08:10:40 -03:00
Kamil Tekiela
58d9bb4a32 Refactor DatabaseInterface::getColumns()
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-11-25 10:28:39 +00: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
b6ea050aef
Use Bootstrap's dropdown for table structure's More button
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-07 16:27:56 -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
3531775b7c
Add type declarations to the controllers contructors
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-11 17:32:22 -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
78c266d98f
Move partition classes to the Partitioning namespace
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-08-21 14:01:25 -03:00
Maurício Meneghini Fauth
04d3c83559
Fix some errors found by PHPStan/Psalm
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-08-05 16:09:08 -03: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
a8d9f44f96
Fix #17016, Fix #17037 - Display the error after structure change errored
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-26 18:55:58 +02:00
Maurício Meneghini Fauth
6ae07c96fb
Replace strpos !== false with str_contains
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-09 22:30:42 -03:00
Maurício Meneghini Fauth
069d8e13db
Fix error found by PHPStan
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-05 15:23:46 -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
Maurício Meneghini Fauth
cc0cc79253
Accept only string for Response::addHTML method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-06-29 18:04:18 -03:00
Maurício Meneghini Fauth
1c084de30b
Fix coding standard errors
Related to 62f142c9fa.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-06-03 16:50:33 -03:00
Maurício Meneghini Fauth
467ef3cd63
Extract the drop column action to a new controller
Extracts the drop action method from Table\StructureController to the
Table\DropColumnController class.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-05-07 12:42:40 -03:00
Maurício Meneghini Fauth
011915fe7b
Add the redirect method to controllers
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-05-07 12:23:26 -03:00
Maurício Meneghini Fauth
5b2957bdc1
Add a redirection after dropping a column
Instead of loading the page in the same action, redirect to the table
structure page.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-05-07 11:24:12 -03:00
Maurício Meneghini Fauth
5f1084ff78
Extract new controller for drop column confirmation
Extracts the Table\StructureController::dropConfirm action to the
Table\DropColumnConfirmationController controller.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-05-06 14:40:10 -03:00
William Desportes
db01d6a9da
Remove some else conditions by using early exits or moving code
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-04-29 01:18:39 +02:00
William Desportes
e0c1dea460
Merge branch 'QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-04-23 03:16:29 +02:00
liviuconcioiu
6dc79009f7
Fix #16810 - SQL query shown twice
Fix SQL query shown twice on PRIMARY, UNIQUE, INDEX, SPATIAL, FULLTEXT, add to central columns, remove from central columns

Signed-off-by: Liviu Concioiu <liviu.concioiu@gmail.com>
2021-04-23 03:05:46 +02:00
Maurício Meneghini Fauth
8d0c2a339c
Move both operands of an assignment to the same line
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-04-20 22:35:21 -03:00
William Desportes
8fbb01a684
Merge branch 'origin/QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-04-19 21:51:45 +02:00
William Desportes
ec4df90ab6
Merge #16811 - Fix #16810 - Fix SQL query shown twice on drop
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-04-19 19:19:30 +02:00
William Desportes
856145297f
Merge branch 'origin/QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-04-13 17:46:06 +02:00
William Desportes
b78f8a094c
Fix #16790 - Undefined index field_name
Unable to reproduce, adding a safety will make the code run properly.

Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-04-12 22:31:37 +02:00
Saksham Gupta
db5fc3fd7f Fix #16810 Fix SQL query shown twice on drop
Signed-off-by: Saksham Gupta <shucon01@gmail.com>
2021-04-12 23:20:48 +05:30
Maurício Meneghini Fauth
44bdd1d390
Rename $url_params global to $urlParams
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-24 22:48:14 -03:00
Maurício Meneghini Fauth
91bd0df2e5
Rename $err_url global to $errorUrl
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-24 19:39:28 -03:00