Commit Graph

52 Commits

Author SHA1 Message Date
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
Kamil Tekiela
cfe54a501b Add union types
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-15 15:23:28 +00: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
2bda275524 Add better type inference
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-12-20 18:55:03 +00:00
Kamil Tekiela
94ba7d69d2 Remove $params array
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-11-05 21:24:10 +00:00
Maurício Meneghini Fauth
3c618c22a9
Add ServerRequest parameter to all controllers
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-07-28 01:00:08 -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
1438cb211e
Replace global keyword with $GLOBALS
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-03-07 17:31:11 -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
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
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
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
Maurício Meneghini Fauth
1a2d7804d2
Add ServerRequest::getParsedBodyParam method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-06 12:24:02 -03:00
Maurício Meneghini Fauth
d2eeebef34
Add getParam and isPost methods to ServerRequest
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-05 13:38:17 -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
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
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
Maurício Meneghini Fauth
d83abf63e7
Use PSR-12 for control structures spacing
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-05 15:27:03 -03:00
Maurício Meneghini Fauth
0b8edc5bde
Use PSR-12 for namespace use statements
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-05 14:18:35 -03:00
William Desportes
d860597375
#16418 - Make MariaDBMySQLKBS optional
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-11-10 12:12:56 +01:00
Maurício Meneghini Fauth
6b81080127 Remove Common::server method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-11-02 18:48:23 -03:00
Maurício Meneghini Fauth
a83ec78ebf Make DatabaseInterface::isUserType method private
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-24 00:40:03 -03:00
Maurício Meneghini Fauth
db3da81056 Remove some useless comments
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-13 19:56:56 -03:00
Maurício Meneghini Fauth
e6ec9df84e Remove DBI dep from Controllers/AbstractController
Moves the DatabaseInterface class dependency to the classes that use it.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-11 22:48:44 -03:00
Maurício Meneghini Fauth
1dccc10493 Extract method for adding script files
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-12 16:58:33 -03:00
Maurício Meneghini Fauth
f4582e083e Use early exit when possible
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-27 00:35:24 -03:00
Maurício Meneghini Fauth
3ae05c785d Use short list syntax and single line arrays
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-26 03:32:59 -03:00
Maurício Meneghini Fauth
3baad2eb1c Fix some coding standard issues
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-25 22:42:37 -03:00
William Desportes
6d123fe452
Some minor codebase fixes and improvements
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-24 15:25:56 +02:00
Maurício Meneghini Fauth
9b7c4931d3 Add AbstractController::render method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-04-16 20:15:42 -03:00
Maurício Meneghini Fauth
8029ea9875 Move request handling from routes to controllers
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-02-12 15:00:02 -03:00
Maurício Meneghini Fauth
f5c970639c Move response handling from routes to controllers
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-02-12 14:59:42 -03:00
Maurício Meneghini Fauth
206199105e Remove useless return type annotations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-23 13:03:29 -03:00
Maurício Meneghini Fauth
6584b01824 Use short versions of scalar types in PHP docs
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-23 12:20:04 -03:00
Maurício Meneghini Fauth
676f48349a Reference global funcs and consts via use statement
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-21 22:13:36 -03:00
Maurício Meneghini Fauth
f80d3e3bd4 Remove unnecessary annotations
@package, @subpackage and others.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-20 17:35:56 -03:00
Maurício Meneghini Fauth
a1bcb9f0f3 Refactor server pages common code
Extracts server_common.inc.php code to the Common::server() method and
removes the include file.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-07 22:49:24 -03:00
Maurício Meneghini Fauth
dd06cd38f8 Defines rules for double quote usage
Makes sure that any use of double quotes strings are warranted.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-01 14:10:07 -03:00
Hugues Peccatte
3255e4ad7b Split Util class regarding the responsabilities (#15567)
PhpMyAdmin\Util is a very huge class with a lot of responsabilities.

There is a lot of work to split it, but this may be just a small start, waiting for a more normalized code.

* Split Util class regarding the responsabilities
* Split the buttonOrImage function

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-11-21 20:20:05 -03:00
Oleg Abrazhaev
43e1d4cade use twig in Structure and Variables controller and add missing tests #14801 (#15534)
* use twig in Structure and Variables controller and add missing tests #14801

Signed-off-by: Oleg Abrazhaev <seyferseed@gmail.com>

* fix lint

Signed-off-by: Oleg Abrazhaev <seyferseed@gmail.com>

* Update templates/database/structure/overhead.twig

fix code review

Co-Authored-By: Maurício Meneghini Fauth <mauricio@fauth.dev>

* Update libraries/classes/Controllers/Database/StructureController.php

fix code review

Co-Authored-By: Maurício Meneghini Fauth <mauricio@fauth.dev>

* fix code review

Signed-off-by: Oleg Abrazhaev <seyferseed@gmail.com>
2019-10-29 22:48:29 -03:00
Maurício Meneghini Fauth
bad2b8eca9 Move server variables entry point to routes file
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-10-27 15:21:59 -03:00
Maurício Meneghini Fauth
1a14b3e4d3 Remove vim modelines
These settings are no longer required as they are guaranteed through
other coding standard tools.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-09-02 09:43:21 -03:00
William Desportes
64c1b26bac
Use strict compare for booleans
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-06-22 17:41:54 +02:00
Maurício Meneghini Fauth
7be0f6bfae Reference class names in use statements
Sort use statements

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-12 00:14:26 -03:00
Maurício Meneghini Fauth
05ce6ffed4 Rename js/server_*.js to js/server/*.js
Rename js/server_status_*.js to js/server/status/*.js

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-07 03:56:22 -03:00
Maurício Meneghini Fauth
c9371d3a91 Rename Controller to AbstractController
Rename PhpMyAdmin\Controllers\Controller to
PhpMyAdmin\Controllers\AbstractController.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-03-11 15:57:14 -03:00