Commit Graph

18 Commits

Author SHA1 Message Date
Maurício Meneghini Fauth
63e6410728
Refactor the DbTableExists class
- Changes static methods to instance methods
- Extract response handling to the controllers
- Add unit tests for the DbTableExists class
- Remove the AbstractController::hasDatabase() method

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-06 01:42:06 -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
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
ba41957e5f Redesign PrimaryController
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-11-08 00:31:47 +00: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
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
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
47a039d70c Implement ResultInterface & MysqliResult
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-31 23:59:24 +00:00
Maurício Meneghini Fauth
feca48cc76
Change return type of DatabaseInterface::getError method
Now, it returns last error message or an empty string instead of false
if no errors occurred.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-27 14:43:14 -03:00
Kamil Tekiela
ce527035c2 PHPStan checkAlwaysTrueCheckTypeFunctionCall fixes
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-08 15:26:52 +00: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