Commit Graph

124 Commits

Author SHA1 Message Date
Maurício Meneghini Fauth
dd2b05330a Remove useless parentheses
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-12 00:18:01 -03:00
Maurício Meneghini Fauth
f6a17433a2 Use null coalesce operator when possible
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-11 20:16:58 -03:00
Maurício Meneghini Fauth
5e203f625a Extract an interface from DatabaseInterface class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-06 14:24:01 -03:00
Maurício Meneghini Fauth
cd5306bab1 Rename PhpMyAdmin\Dbi to PhpMyAdmin\Dbal
Rename Dbi (Database Interface) to Dbal (Database Abstraction Layer).

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-06 13:12:01 -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
Maurício Meneghini Fauth
bcfeba36d8 Merge branch 'QA_5_0'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-11-04 16:10:37 -03:00
Maurício Meneghini Fauth
e0ee0f8165 Merge branch 'QA_4_9' into QA_5_0
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-11-04 16:09:23 -03:00
Hugues Peccatte
a52593e6ac Fix operators precedence possible issue
As "==" has priority over "&", it was firstly checking the equality… which were always true…

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-11-02 00:45:59 +01:00
Maurício Meneghini Fauth
6dd961c8f3 Refactor server engines entry point
Moves server engines entry point logic to the routes files and moves the
request parameters to the route parameter.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-10-26 12:55:54 -03:00
William Desportes
66bd7fb596
Merge branch 'QA_5_0'
Sign-off: fc393eac39

Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-10-21 13:36:44 +02:00
William Desportes
fc393eac39
Fix phpcs and ignore PSR2.Methods.FunctionCallSignature.Indent 2019-10-21 13:30:38 +02:00
William Desportes
14d73c1da0
Merge branch 'QA_5_0' into master
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-10-21 13:03:33 +02:00
Isaac Bennetch
f4978c8a8e Merge commit 'd15211db5c' into QA_5_0 2019-10-20 23:12:17 -04:00
Isaac Bennetch
dd28239a37 Merge commit '4e7fac843d' into QA_5_0 2019-10-20 23:11:42 -04:00
William Desportes
af344bb4c1
Fix #14433 - return an array with an empty user and empty host
Fixes: 83602a6b72
This is an unexpected change, detected by unit tests

Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-10-20 15:09:19 +02:00
William Desportes
83602a6b72
Fix #14433 - return an empty array
Fixes: b8650115be

Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-10-20 15:01:02 +02:00
William Desportes
b8650115be
Fix #14433 - "You do not have privileges to manipulate with the users!" on root superadmin
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-10-20 14:43:47 +02:00
Maurício Meneghini Fauth
13e1362f26 Add initial suport for prepared statements
Creates the DbiExtension::prepare method.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-10-06 11:46:40 -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
Maurício Meneghini Fauth
84cb56ab4d Use the router for the logout page
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-08-19 22:47:53 -03:00
Maurício Meneghini Fauth
88c28f095a Fix some errors detected by PHPStan
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-08-01 19:04:27 -03:00
Hugues Peccatte
1b744d0cc8 Simplify code regarding type hinting
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-07-16 23:21:25 -03:00
Hugues Peccatte
9c0806cfcf Fix static / non-static calls
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-07-16 23:21:25 -03:00
Hugues Peccatte
0d8f6a3a93 Merge isset and unset calls
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-07-16 23:21:25 -03:00
Maurício Meneghini Fauth
cda99ea57f Use the router for the server_engines.php page
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-07-09 21:51:49 -03:00
Maurício Meneghini Fauth
e99f3ace5c Move DbiDummy extension to the test directory
DbiDummy extension is only used for testing purposes

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-28 18:00:36 -03:00
William Desportes
a2268169ae
Use strict compare for count function
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-06-22 17:44:49 +02:00
William Desportes
6cc352ac12
phpstan level 3 fixes
21 errors left

Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-06-22 14:37:38 +02:00
Maurício Meneghini Fauth
6316967e01 Merge branch 'QA_4_9'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-19 13:11:41 -03:00
Maurício Meneghini Fauth
7ef47312db Remove remaining calls to old DI container
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-17 15:02:08 -03:00
Hugues Peccatte
1b5131863f Get rid of old container in DatabaseInterface
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-06-15 21:40:21 +02:00
Maurício Meneghini Fauth
e1f9ae00cd Add a trailing comma in multi-line arrays
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-14 14:09:26 -03:00
Maurício Meneghini Fauth
c8f84fc748 Replace is_null with identical comparison with null
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-12 13:28:22 -03: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
William Desportes
ec74b34010
Fix "logout and try as another user link"
- I changed the link to not use ajax mode

Try the query 'GRANT PROXY ON 'root'@'localhost' TO 'root'@'localhost' WITH GRANT OPTION' to reproduce

Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-06-09 17:15:16 +02:00
Maurício Meneghini Fauth
1f62d01470 Use spaceship operator instead of nested ternary operator
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-05-22 18:43:54 -03:00
Maurício Meneghini Fauth
83f56cdedf Merge branch 'QA_4_8'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-05-22 18:35:35 -03:00
Maurício Meneghini Fauth
dafc17c52e Add explicit parentheses in nested ternary operators
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-05-22 18:32:42 -03:00
Hugues Peccatte
380707fbcd Define controllers as services in an external configuration file
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-05-19 01:54:44 +02:00
Hugues Peccatte
7b00f5d35a Update PHPDoc
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-05-14 21:59:57 +02:00
William Desportes
bd1a48b3aa
Merge branch 'QA_4_8'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-05-07 10:37:47 +02:00
William Desportes
7233a887da
Fix #15251 - SQL queries > affected lines > -1 > does not show as error
Fixes: #15251
Introduced-by: 4e01371cd251a0f30b26540f22bbda3ea80945feSigned-off-by: William Desportes <williamdes@wdes.fr>
2019-05-07 10:34:56 +02:00
Maurício Meneghini Fauth
f66841d8ef Fix coding standard errors
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-05-01 14:47:27 -03:00
William Desportes
fbd89fb882
Merge branch 'QA_4_8'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-05-01 17:53:24 +02:00
William Desportes
e39ae0f989
Fix #14614 - "# 2014 - Commands out of sync; you can't run this command now" returned when stored procedure does not return any result set
Fixes: #14614
Pull-request: #15234
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-05-01 17:08:36 +02:00
William Desportes
77fc2c58e9
Fix #14614 - Commands are out of sync with $cfg['DBG']['sqllog'] = true;
Fixes: #14614
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-04-29 23:08:23 +02:00
Maurício Meneghini Fauth
2b79b8e50a Replace dbi global with $this in DatabaseInterface
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-04-18 01:51:26 -03:00
Maurício Meneghini Fauth
17195fbe72 Get $dbi from DIC instead of global in entry points
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-04-18 01:09:38 -03:00
Maurício Meneghini Fauth
525a436162 Fix some PHPStan errors
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-03-19 16:48:54 -03:00