Maurício Meneghini Fauth
22c6a2f9d8
Add a wrapper around the exit language construct
...
Creates the PhpMyAdmin\ResponseRenderer::callExit() method as a wrapper
to the exit language construct. That makes the tests more correct as the
method will always stop the code execution.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-06-06 21:54:07 -03:00
Maurício Meneghini Fauth
6a2c12bdc8
Add missing traversable type hints
...
Replace array type hint with mixed[] type hint, since it means the same.
This way it's possible to require traversable type hint for new code.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-04-02 01:32:12 -03:00
Maurício Meneghini Fauth
dd885dc7b8
Use single-line arrays when possible
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-03-27 17:39:17 -03:00
Maurício Meneghini Fauth
52c14a1911
Fix wrong global variable name
...
Introduced by 437215cab2
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-03-27 12:42:13 -03:00
Maurício Meneghini Fauth
e5698c85e9
Require single line for function calls
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-03-26 23:10:10 -03:00
Maurício Meneghini Fauth
437215cab2
Rename variables to use camel case format
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-03-26 21:47:50 -03:00
Kamil Tekiela
20a246203f
Clean up is_foreign_key_supported
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-03-03 21:52:19 -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
Kamil Tekiela
80c4db7253
Use strict check when type is known
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-19 23:19:54 +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
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
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
d0d90551c3
Remove the dblist global variable
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-13 21:08:00 -03:00
Kamil Tekiela
2c416128e5
Pass as argument to Table
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-10-17 22:30:33 +01: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
Rodrigo Pokemaobr
556804c4e2
Removing get tables from twig template and removing relationextension from twig template
...
Signed-off-by: Rodrigo Pokemaobr <contato@pokemaobr.dev>
2022-05-31 16:22:46 -03:00
Rodrigo Pokemaobr
228fde03ee
Removing get display field function on twig template
...
Signed-off-by: Rodrigo Pokemaobr <contato@pokemaobr.dev>
2022-05-24 14:38:49 -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
Kamil Tekiela
47e81a5161
Remove $route global
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-01-27 11:47:40 +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
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
92418f2226
Fix some coding standard issues
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-21 13:39:29 -03:00
Maurício Meneghini Fauth
2a4b170a34
Merge branch 'QA_5_1'
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-21 13:13:09 -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
Kamil Tekiela
83d950ed40
Bug fix: Fix triple HTML encoding
...
Some values were encoded into HTML entities thrice. This commit removes
unnecessary HTML escaping.
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-14 12:21:36 +00: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
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
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
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
caa3337411
Extract FK related methods from Util class
...
Creates the PhpMyAdmin\Utils\ForeignKey class.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-21 15:25:45 -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
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
Petr Duda
1086b2a6ee
Fix #12961 Indexes shown at both tbl_structure and tbl_relation
...
Signed-off-by: Petr Duda <petrduda@seznam.cz>
2020-09-13 19:31:59 +02: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
Maurício Meneghini Fauth
a3147c26e1
Extract exit; from Core::previewSQL method
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-09 16:20:41 -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
3baad2eb1c
Fix some coding standard issues
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-25 22:42:37 -03:00
Maurício Meneghini Fauth
a64393e7f5
Fix some coding standard issues
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-13 00:23:28 -03: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
db642ab19e
Extract HTML from Index:getHtmlFromIndexes
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-03-29 23:43:18 -03:00