Commit Graph

68 Commits

Author SHA1 Message Date
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
6264f6f1ea
Various refactorings 2 (#17965)
* Remove extra blank lines
* Remove useless param annotations
* Refactor Index::singleton
* Refactor Config.php
* Refactor Header::addRecentTable()
* Collapse return statement into a single line
* Refactor Message.php
* Convert $getUniqueCondition into a scalar
* Code style
* Fix invalid return phpdoc
* Remove unused variable
* Remove redundant empty array checks
* Refactor Export::closeFile()
* Simplify else statement
* Remove redundant else
* Refactor TablePartitionDefinition::getDetails
* Simpler returns
* Add types for getCellContent()
* Remove useless method mngInsideStructComm

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-12-24 12:54:23 -03:00
Kamil Tekiela
f174282442 Remove temporary var $column_names
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-12-14 17:23:44 +00:00
Maurício Meneghini Fauth
0f57dfff5b
Merge pull request #17800 from kamil-tekiela/Fix-phpstan-issues-2
Fix PHPStan issues 2
2022-10-17 20:32:59 -03:00
Bhuvi100
9a3090ef75
Make search input field types match columns types (integer and float) (#17765)
This PR adds type attribute as well as inputmode attribute to search value input fields which makes it easier for validation as well as for using phpMyAdmin on touch devices with virtual keyboards.

Fixes #17745

Signed-off-by: Bhuvanesh T G <gbhuvanesh100@gmail.com>
Co-authored-by: William Desportes <williamdes@wdes.fr>
2022-10-17 15:41:51 -03:00
Kamil Tekiela
0ca6b456d5 Casting to int something that's already int
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-10-15 20:15:50 +01: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
Rodrigo Pokemaobr
547f89996f Removing Foreign Data from Twig
Signed-off-by: Rodrigo Pokemaobr <contato@pokemaobr.dev>
2022-05-24 16:17:04 -03:00
Rodrigo Pokemaobr
d5585c3104 Removing search columns in foreigners from twig
Signed-off-by: Rodrigo Pokemaobr <contato@pokemaobr.dev>
2022-05-24 15:34:55 -03:00
Maurício Meneghini Fauth
9931600c4d Fix coding standard issues
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-05-18 22:57:44 -03:00
Rodrigo Pokemaobr
272725f86e Adjusting the lint in files
Signed-off-by: Rodrigo Pokemaobr <contato@pokemaobr.dev>
2022-05-17 18:02:26 -03:00
Rodrigo Pokemaobr
5ce4fe0b49 Removing foreign dropdown from twig functions
Signed-off-by: Rodrigo Pokemaobr <contato@pokemaobr.dev>
2022-05-17 16:35:35 -03:00
Maurício Meneghini Fauth
6dc859cbc2
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-04-28 15:56:18 -03:00
Maurício Meneghini Fauth
54df014550
Remove stickyfilljs JavaScript dependency
This polyfill is not needed anymore.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-04-27 19:47:31 -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
86031d2bf6 Deimplement fetchAssoc() helper
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-01-09 22:44:53 +00:00
Kamil Tekiela
83b4dda1a3 Change QUERY_STORE to QUERY_BUFFERED
Set the value to 0 instead of 1 and remove all unnecessary usages of this constant

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-01-01 01:46:01 +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
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
Kamil Tekiela
1270efc2a9
Refactor util.php (#17212)
* Remove extra space

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Remove null checks on properties that cannot be null

The value could be null only if the property exists in stdClass
returned by mysqli but is null. Mysqli doesn't do that. Unless the value
can be null in some other way, this check is redundant.

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Add psalm-return

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Remove $handle parameter of getUniqueCondition()

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Type hint the $row parameter

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

Co-authored-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-02 17:37:09 -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
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
7f6472b2c2
Add void return type where possible
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-13 15:29:11 -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
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
9f0fc40cdb
Merge branch 'QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-04-02 13:40:28 +02:00
William Desportes
700108ba90
Add missing stickfill script on zoom search
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-04-01 18:31:53 +02: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
035e29a80b
Extract GIS related methods from Util class
Creates the PhpMyAdmin\Utils\Gis class.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-22 15:03:39 -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
c5155ecae9
Refactor field flags to use an object an not strpos
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-02-24 23:56:33 +01:00
Saksham Gupta
4da866ed94 Fix #16424 - Numerical search in table and zoom
Signed-off-by: Saksham Gupta <shucon01@gmail.com>

Fixes #16667

Signed-off-by: Saksham Gupta <shucon01@gmail.com>

Add comment and change variable name

Signed-off-by: Saksham Gupta <shucon01@gmail.com>
2021-02-19 00:33:10 +05:30
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
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
405b6277e7 Merge branch 'QA_5_0'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-10 14:16:25 -03:00
Maurício Meneghini Fauth
bb32ba6d9c Fix some coding standard issues
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-04 12:31:43 -03:00
Maurício Meneghini Fauth
f2e49a92c6 Fix some type errors detected by PHPStan
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-09-30 19:23:01 -03:00
Maurício Meneghini Fauth
5aa2856f7f Remove Util::buildActionTitles and the titles global
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-09-12 22:50:08 -03:00
Rosheen Naeem
673c194b01 Fixed underscore prefixes
Signed-off-by: Rosheen Naeem <rosheennaeem4@gmail.com>
2020-08-06 17:51:34 +05:00
Maurício Meneghini Fauth
e26bde7e96 Fix coding standard errors
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-24 20:33:47 -03:00