Commit Graph

3785 Commits

Author SHA1 Message Date
Maurício Meneghini Fauth
4001460066
Merge branch 'QA_5_1'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-21 15:00:06 -03:00
Maurício Meneghini Fauth
d7ced91ae2
Fix db selection when nav tree is disabled
$cfg['ShowDatabasesNavigationAsTree'] = false;

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-21 12:08:21 -03:00
Kamil Tekiela
51f4017b32
Refactor destroy controller (#17194)
* Remove redundant conditions

They were always true. First, the variable is set to -1.
If the variable is -1, then set it to Message.
If the variable is Message then set the JSON array. All of this is
redundant.

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

* $sqlQuery is not used anywhere

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

* Enforce $selected to be an array

I can't remove it as it is a global. Previously, it was set to a POST
variable. Since we validate that the variable is set and is not null,
we can use the value from $params. If we validate that it's also an
array we can replace for loop with foreach.
There is no passing by reference, so this change should be safe.

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

* Replace $rebuildDatabaseList with input validation

The validation message says 'No databases selected.' so I assume that
we should check that we actually got at least one entry in the list.
If that is true, then the $rebuildDatabaseList is not needed and the
condition redundant.

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

* drop_selected_dbs is always set and is redundant

I am not sure if this is necessary. The AJAX request sends a value of "1"
but the code doesn't really do anything with it other than checking if
it is actually set. Is there some other path possible?

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

* Flatten the array with a single element

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

* Remove redundant isset

The variable is set, so !isset === is_null. Why check for null if we can
check just for !is_array.

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

* Update psalm-baseline.xml

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

* Adhere to the coding standard

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-11-19 14:26:04 -03:00
Maurício Meneghini Fauth
b86b70d639
Improve type definitions of Scripts class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-18 15:25:00 -03:00
Maurício Meneghini Fauth
857a9d3337
Remove unnecessary @var annotations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-18 12:15:30 -03:00
Maurício Meneghini Fauth
090d2eece7
Fix some issues found by PHPStan
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-16 15:11:57 -03:00
Maurício Meneghini Fauth
0d81b2166a
Add test for Sql::executeQueryAndSendQueryResponse
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-15 19:51:16 -03:00
Maurício Meneghini Fauth
98e70c6ae6
Suppress some Psalm errors in ImportXml plugin class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-15 16:06:05 -03:00
Maurício Meneghini Fauth
7fc8c4bd15
Remove @var annotation in Table::getColumnGenerationExpression
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-15 13:36:47 -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
43867f262d
Fix some errors errors found by PHPStan
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-11 11:16:13 -03:00
Maurício Meneghini Fauth
a835d7cfcc
Remove array support from Util::backquote
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-10 19:33:09 -03:00
Maurício Meneghini Fauth
3ec311028b
Fix some errors found by Psalm
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-08 00:52:30 -03:00
Maurício Meneghini Fauth
b6ea050aef
Use Bootstrap's dropdown for table structure's More button
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-07 16:27:56 -03:00
Maurício Meneghini Fauth
f820e2a970
Remove the unused Theme::cssFiles property
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-03 09:21:43 -03:00
Maurício Meneghini Fauth
220ed30ef8
Remove printview.css theme files
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-10-31 17:35:55 -03:00
Maurício Meneghini Fauth
78104be8fb
Remove print view mode
- Removes the print.css file.
- Data ditionary now opens like other pages. Printing the page works
  like before.

Fixes #17169
Closes #17170

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-10-31 13:22:07 -03:00
Maurício Meneghini Fauth
e8f57353f5
Merge branch 'QA_5_1'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-10-28 14:10:04 -03:00
Maurício Meneghini Fauth
7bcccf7bdc
Remove connection parameter from getClientInfo
Related to #16911

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-10-28 13:53:15 -03:00
Kamil Tekiela
9dcfc13ac4
Simplify getClientInfo
See #16911

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-10-28 13:27:41 -03:00
Maurício Meneghini Fauth
50b0985401
Merge pull request #17128 from shucontech/create_view_modal
Replace Create view dialog with modal
2021-10-28 12:39:15 -03:00
Maurício Meneghini Fauth
3922cb7928
Merge branch 'QA_5_1'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-10-27 15:04:40 -03:00
Hidayatullah
064f1eb64b
Fix bbcode not rendered for error messages on setup
Fixes #17090
Closes #17138

Signed-off-by: Hidayatullah <ayat.kyo@gmail.com>
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-10-27 14:39:27 -03:00
Daniel Tiringer
a87048bb1b
Extract RecentFavoriteTable html to twig (#17157)
Extract HTML from libraries/classes/RecentFavoriteTable.php to Twig templates

Related to #14801

Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com>
2021-10-27 12:59:14 -03:00
Daniel Tiringer
a8eaee326d
Extract Server/Privileges/getUserLink html to twig (#17156)
Extract HTML from libraries/classes/Server/Privileges.php's getUserLink function to Twig templates

Related to #14801

Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com>
2021-10-26 19:03:09 -03:00
Rodrigo Wanderley de Melo Cardoso
7f7a234e20
Changing HTMLOutput to Twig (#17160)
Signed-off-by: Rodrigo Pokemaobr <contato@pokemaobr.dev>
2021-10-21 15:31:22 -03:00
Rodrigo Wanderley de Melo Cardoso
f4d52552be
Changing HTMLOutput to Twig Templates (#17159)
Signed-off-by: Rodrigo Pokemaobr <contato@pokemaobr.dev>
2021-10-21 14:48:00 -03:00
Maurício Meneghini Fauth
b188b1fda0 Remove exception throw from Dbal\Warning class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-10-10 18:39:43 -03:00
Maurício Meneghini Fauth
e5f9012280
Use composer/ca-bundle to manage the CA cert file
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-10-09 12:50:51 -03:00
Maurício Meneghini Fauth
c1e864b1d7
Add Warning value object for SHOW WARNINGS rows
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-10-09 00:09:01 -03:00
Maurício Meneghini Fauth
75a1b02927
Add Table\Maintenance\Message value object
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-10-06 14:06:03 -03:00
Maurício Meneghini Fauth
560fb6ff8e
Refactor Table\Maintenance controllers to use ServerRequest
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-10-05 16:35:26 -03:00
Luca
1d17093866
refactor: Security Key Example (#17133)
Signed-off-by: LucaTanks <luca@lucatanks.xyz>
2021-10-03 20:25:10 -03:00
Saksham Gupta
3149ee8443 Replace Create view dialog with modal
Signed-off-by: Saksham Gupta <shucontech@gmail.com>

Fix code quality

Signed-off-by: Saksham Gupta <shucontech@gmail.com>
2021-10-02 19:57:46 +05:30
Maurício Meneghini Fauth
c68b6a01a7
Merge pull request #17119 from shucontech/enum_editor_modal
Replace ENUM/SET editor dialog with modal
2021-10-01 14:00:39 -03:00
Maurício Meneghini Fauth
0c781c9335
Rename TableName|DatabaseName create method to fromString
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-30 22:14:51 -03:00
Maurício Meneghini Fauth
88b48c810d
Use ServerRequest for Table\Partition controllers
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-30 16:56:34 -03:00
Maurício Meneghini Fauth
67e96cf40c
Get default config values from Config\Settings classes
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-30 12:04:47 -03:00
Maurício Meneghini Fauth
3e0856c77b
Remove useless string concatenations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-27 21:40:22 -03:00
Maurício Meneghini Fauth
9f3b4f04e9
Wrap variable variables in curly braces
See: https://www.php.net/manual/en/language.variables.variable.php

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-27 19:18:48 -03:00
Maurício Meneghini Fauth
e96b75bb92
Replace class strings with the ::class constant
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-27 19:17:45 -03:00
Maurício Meneghini Fauth
7955f7d96d
Replace pow function with the ** operator
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-27 19:12:11 -03:00
Maurício Meneghini Fauth
e9ec9e8b71
Replace rand functions with random_int
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-27 19:05:42 -03:00
Maurício Meneghini Fauth
4834c5fe7d
Remove bypass flag from Util::backquote method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-26 11:51:34 -03:00
Maurício Meneghini Fauth
a1113b282f
Use DatabaseName and TableName to validate db and table values
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-23 21:51:07 -03:00
Maurício Meneghini Fauth
74f142d997
Merge branch 'QA_5_1'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-23 13:10:38 -03:00
Maurício Meneghini Fauth
6387eaad66
Fix a PHP notice when logging out
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-23 12:47:43 -03:00
Maurício Meneghini Fauth
87983d1cf5
Add PhpMyAdmin\Dbal\TableName value object class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-22 16:31:10 -03:00
Saksham Gupta
6a963080b3 Replace ENUM/SET editor dialog with modal
Signed-off-by: Saksham Gupta <shucontech@gmail.com>
2021-09-20 22:51:30 +05:30
Maurício Meneghini Fauth
229d8dfb5e
Extract Console, Debug and SqlQueryBox classes from Settings
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-19 13:17:32 -03:00