Commit Graph

56 Commits

Author SHA1 Message Date
Kamil Tekiela
555c6798eb Add native param types
Includes TypeHints.UnionTypeHintFormat

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-03-17 12:45:18 +00:00
Maurício Meneghini Fauth
556594b4cd
Fix coding standard spacing issues
- Fixes one line doc comments
- Fixes parent call spacing
- Fixes constant spacing

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-24 21:06:17 -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
8433f66447 Remove unused variable in catch
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-14 12:10:23 +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
Maurício Meneghini Fauth
5df50f6a11
Refactor Tracking export download to remove exit
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-10 16:18:26 -03:00
Maurício Meneghini Fauth
a1c8769fab
Refactor $dateFrom and $dateTo to use DateTimeImmutable
Uses the DateTimeImmutable object to validate the datetime values of the
$dateFrom and $dateTo variables in the Tracking class.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-07 16:50:18 -03:00
Maurício Meneghini Fauth
d9fcd3555b
Remove filter_ts_* global variables
Replaces them with $dateFrom and $dateTo variables.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-07 16:03:22 -03:00
Maurício Meneghini Fauth
17d9855420
Remove $_POST variables from Table\TrackingController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-06 14:25:09 -03:00
Maurício Meneghini Fauth
4044c3bc3c
Remove unnecessary global variable 'data'
Replaces it with a regular varible.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-06 13:22:46 -03:00
Maurício Meneghini Fauth
789a7e441d
Remove usage of $_POST['logtype']
- Replaces with variable get from ServerRequest object
- Renames it log_type for readability

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-06 11:45:07 -03:00
Maurício Meneghini Fauth
0f2ff29d9d
Remove tracking's selection_* global variables
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-05 17:24:18 -03:00
Maurício Meneghini Fauth
db75ac370d
Add method to validate logtype request param
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-05 16:46:48 -03:00
Maurício Meneghini Fauth
0cc6340d29
Fix error after #17819 merge
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-05 15:37:45 -03:00
Kamil Tekiela
959849f446
Introduce ServerRequest::hasBodyParam() (#17870)
* Drop Sql::setUiProp()
* Remove ternary operator
* Improve array guard
* Remove redundant isset
* Implement hasBodyParam()
* Add has() and hasQueryParam()

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-11-05 13:04:45 -03:00
Maurício Meneghini Fauth
4bd3a1c423
Fix some issues and update SA baselines
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-10-29 17:27:51 -03:00
Luca Perna
4540d6ead0
Ref #16276 - Reduce the usage of SuperGlobals in Tracking and UserPassword (#17820)
* 16276 - Reduce the usage of SuperGlobals in Tracking and UserPassword

Signed-off-by: Luca Perna <luca@perna.rocks>

* 16276 - minor code style refactorings

Signed-off-by: Luca Perna <luca@perna.rocks>

Signed-off-by: Luca Perna <luca@perna.rocks>
Co-authored-by: Luca Perna <luca@perna.rocks>
2022-10-29 13:24:19 -03:00
Luca Perna
cca381a415
#17769 Use ServerRequest Object to access POST-vars (#17819)
* 17769 - use Request object instead of SuperGlobals

Signed-off-by: Luca Perna <luca@perna.rocks>
2022-10-29 11:57:47 -03:00
Luca Perna
d1b5cb6987
16276 - Reduce the usage of SuperGlobals (#17795)
Signed-off-by: Luca Perna <luca@perna.rocks>
2022-10-20 01:52:38 -03:00
Maurício Meneghini Fauth
4bda7899ab
Fix coding standard issues after #17794 merge
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-10-14 08:44:52 -03:00
Luca Perna
40adf927c5
Move superglobals access to controllers (#17794)
Related to #16276

Signed-off-by: Luca Perna <luca@perna.rocks>
2022-10-14 08:34:42 -03: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
f5d738db59
Move input.sqlbutton event listener to sql.js file
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-06-19 16:48:10 -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
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
a2ed4dfe68
Make controllers callable
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-08-30 13:16:29 -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
674bf8f97c
Remove db, table and dbi globals from Tracking class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-05-26 16:40:05 -03:00
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
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
Maurício Meneghini Fauth
1e5fbd57fc
Create Twig\AssetExtension and image Twig function
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-01-28 16:09:17 -03:00
Maurício Meneghini Fauth
ef62d7a9f5 Remove is_system_schema PHP global variable
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-11-02 18:48:23 -03:00
Maurício Meneghini Fauth
36d93cf2f9 Remove Common::table method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-11-02 18:48:23 -03:00
Maurício Meneghini Fauth
94483dd4b9 Extract the HTML from Table\TrackingController::index
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-14 17:13:34 -03:00
Maurício Meneghini Fauth
601ed4649e Remove DBI dep from Table\AbstractController
Moves the DatabaseInterface class dependency to the classes that use it.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-12 12:53:03 -03:00
Maurício Meneghini Fauth
3c21cf1853 Remove url_query PHP global
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-09-08 13:32:25 -03:00
Maurício Meneghini Fauth
ceac762e09 Remove pmaThemePath and pmaThemeImage PHP globals
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-09-02 10:57:57 -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
3b285ff17e Use identical operator for non-empty strings
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-10 18:06:29 -03:00