Commit Graph

279 Commits

Author SHA1 Message Date
Maurício Meneghini Fauth
bd979dd1ff Remove useless elseif with if
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-26 22:53:44 -03:00
Maurício Meneghini Fauth
2d02a15de3 Add static to closures that don't use $this
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-26 18:30:57 -03:00
William Desportes
4d61ef2313
Split some code out of DatabaseInterface
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-26 13:18:01 +02: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
9269d75fb4 Fix some coding standard issues
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-25 20:22:18 -03:00
William Desportes
11cb629bf0
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-24 01:27:19 +02:00
Petr Duda
ad00dfc24c Fix #16130 - Local documentation links
Signed-off-by: Petr Duda <petrduda@seznam.cz>
2020-05-23 17:36:57 +02:00
Maurício Meneghini Fauth
80a45fa0ae Break too long lines
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-16 18:08:20 -03:00
Maurício Meneghini Fauth
8dd310fb6a Remove assignments in if conditions
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-16 01:35:19 -03:00
William Desportes
fcd41f6c85
Remove some mysql extension assertions
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-15 22:17:58 +02:00
Maurício Meneghini Fauth
064ba71ed4 Replace or operator in DatabaseInterface::query method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-15 16:42:59 -03:00
Maurício Meneghini Fauth
75fc2ed74f Remove dbi global from DatabaseInterface::load method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-15 16:24:14 -03:00
Maurício Meneghini Fauth
84139f4d51 Remove some useless variables
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-13 16:15: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
William Desportes
cc82f092ce
Fix MissingClosureParamType errors
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-04-29 01:08:40 +02:00
William Desportes
9a8e311a76
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-02-22 17:06:52 +01:00
William Desportes
cc0c975e78
Fix _getSqlForTablesFull and getColumnsFull for Windows CI
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-02-22 16:59:26 +01:00
William Desportes
818b9f76bf
Fix more broken queries on Windows CI
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-02-22 16:59:26 +01:00
William Desportes
0455dab6bb
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-02-15 11:40:12 +01:00
William Desportes
39284cc877
Use isset for errno
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-02-15 01:42:40 +01:00
William Desportes
47d00d85ef
Fix Uncaught TypeError for strtoupper caught on Windows unit test suite
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-02-15 01:32:44 +01:00
William Desportes
8f0d7d3fc1
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-02-14 23:10:20 +01:00
William Desportes
150d72bec4
Fix #15958 - Uncaught TypeError when sorting tables by size or by rows
Fixes: #15958

Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-02-14 23:08:35 +01:00
Maurício Meneghini Fauth
206199105e Remove useless return type annotations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-23 13:03:29 -03:00
Maurício Meneghini Fauth
6584b01824 Use short versions of scalar types in PHP docs
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-23 12:20:04 -03:00
Maurício Meneghini Fauth
e1c69c6a14 Reference global funcs and consts via use statement
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-22 00:26:45 -03:00
Maurício Meneghini Fauth
f80d3e3bd4 Remove unnecessary annotations
@package, @subpackage and others.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-20 17:35:56 -03:00
Maurício Meneghini Fauth
6283caaabf Use one line for comments with a single line
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-20 16:04:09 -03:00
Maurício Meneghini Fauth
c231652c67 Remove useless comments in PHP docs
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-20 14:38:49 -03:00
Maurício Meneghini Fauth
8ec4209002 Fix some coding standard issues
- Inverts yoda comparisons
- Removes parentheses from return
- Removes useless ternary operators
- Adds paretheses to new instances
- Adds trailing array comma

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-20 00:38:34 -03:00
Maurício Meneghini Fauth
3f7204beb7 Add coding standard rule for self reference
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-19 23:31:20 -03:00
Maurício Meneghini Fauth
285907991e Add coding standard rules for whitespace
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-19 22:29:54 -03:00
William Desportes
249ee4dbd2
Improve JS and phpdoc by removing useless spaces
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-16 18:39:42 +01:00
William Desportes
5b787e7b6d
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-06 20:14:46 +01:00
William Desportes
bd808c8d4f
Merge branch 'QA_4_9' into QA_5_0
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-06 15:23:34 +01:00
William Desportes
156231d5bf
Fix not isset $GLOBALS['dblist']
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-06 15:22:35 +01:00
William Desportes
e3f9efe7e0
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-06 14:26:08 +01:00
William Desportes
d01dab811c
Merge branch 'QA_4_9' into QA_5_0
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-06 14:25:25 +01:00
William Desportes
6c35ea3be7
Fix #15724 - Fix 2FA disabled
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-06 14:17:03 +01:00
William Desportes
205790f6bd
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-12-30 17:55:50 +01:00
William Desportes
f9157f2ac4
Fix #15723 - Can't browse certain tables since 5.0.0 update
Fixes: #15723
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-12-30 17:54:00 +01:00
Maurício Meneghini Fauth
a168ec2948 Fix conding standard issue
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-21 19:02:07 -03:00
William Desportes
06701ab562
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-12-21 21:48:59 +01:00
William Desportes
9633175165
Merge branch 'QA_4_9' into QA_5_0
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-12-21 21:38:13 +01:00
William Desportes
f402a8f2cf
Merge #15681 - Fix #15608 DisableIS is broken on pma 4.9.2 with controluser configured
Fixes: #15608
Pull-request: #15681
Ref: 2bc8afea5f
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-12-21 21:34:05 +01:00
William Desportes
28e2814ee9
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-12-21 21:04:39 +01:00
William Desportes
aa2f369bf3
Merge branch 'QA_4_9' into QA_5_0
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-12-21 20:27:25 +01:00
Maurício Meneghini Fauth
542ba3025a Fix control user issue
Partially reverts commit 2bc8afea5f.

Fixes #15608
Related to #14433

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-21 14:56:59 -03:00
Maurício Meneghini Fauth
9d3f7519c9 Revert "Fix #14433 - "You do not have privileges to manipulate with the users!" on root superadmin"
This reverts commit b8650115be.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-21 14:54:40 -03:00
William Desportes
6e7e90169a
Fix a possibly undefined index as reported to our server
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-12-21 16:38:21 +01:00
William Desportes
31ee76f507
Fix a phpstan errpr
Introduced-by: c01377b161
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-12-18 23:03:47 +01:00
William Desportes
cc57586f25
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-12-18 22:42:20 +01:00
William Desportes
02304bcebf
Merge branch 'QA_4_9' into QA_5_0
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-12-18 21:48:27 +01:00
William Desportes
c01377b161
Fix undefined index for proxysql on @@version_comment and @@version
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-12-18 18:40:21 +01:00
Maurício Meneghini Fauth
39f42f848b Remove some useless docblock comments
Fixes docblock spacing

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-13 21:15:00 -03:00
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
Maurício Meneghini Fauth
4001839460 Upgrade PHPStan to v0.11.4
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-03-18 20:29:02 -03:00
Maurício Meneghini Fauth
ae7db62823 Fix TypeError on insert page when there are invisible columns
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-03-07 21:15:35 -03:00
Rob Ratcliffe
02c16b0acc Removing inline styles from php files and adding class to css
Closes #14696

Signed-off-by: Rob Ratcliffe <rlr@tcliffe.codes>
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-02-24 21:06:29 -03:00
Vincent Milum Jr
31b40f71bb Fix for SYSTEM VERSIONED tables #14514, #14515, and #14516 (#14536)
Fixes #14514
Fixes #14515
Possible fix for #14516

 #14514 Tables which enable the new MariaDB 10.3 versioning show up as "SYSTEM VERSIONED" instead of "BASE TABLE" inside of information schema. This patch now checks for both, so these new table types don't incorrectly display as views.

 #14515 MariaDB 10.3 also supports INVISIBLE columns, which is optionally paired with SYSTEM VERSIONED tabled (or implemented separately). This patch helps handle this new column attribute.

 #14516 This patch cannot be fully tested and verified with current MariaDB builds. Version 10.3.9 (currently unreleased) corrects an issue with column information for SYSTEM VERSIONED columns that this patch relies on. https://jira.mariadb.org/browse/MDEV-16804 - the reason for checking with preg_match instead of adding to the list is because there are now combined "extra" information for columns, such as INVISIBLE columns. Just matching entire strings also has a bug with these other "extra" parameters.

Signed-off-by: Vincent Milum Jr <git@darkain.com>
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
(cherry picked from commit 3f6e360a4e)
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-02-15 17:27:55 -02:00
Vincent Milum Jr
3f6e360a4e Fix for SYSTEM VERSIONED tables #14514, #14515, and #14516 (#14536)
Fixes #14514
Fixes #14515
Possible fix for #14516

#14514 Tables which enable the new MariaDB 10.3 versioning show up as "SYSTEM VERSIONED" instead of "BASE TABLE" inside of information schema. This patch now checks for both, so these new table types don't incorrectly display as views.

#14515 MariaDB 10.3 also supports INVISIBLE columns, which is optionally paired with SYSTEM VERSIONED tabled (or implemented separately). This patch helps handle this new column attribute.

#14516 This patch cannot be fully tested and verified with current MariaDB builds. Version 10.3.9 (currently unreleased) corrects an issue with column information for SYSTEM VERSIONED columns that this patch relies on. https://jira.mariadb.org/browse/MDEV-16804 - the reason for checking with preg_match instead of adding to the list is because there are now combined "extra" information for columns, such as INVISIBLE columns. Just matching entire strings also has a bug with these other "extra" parameters.

Signed-off-by: Vincent Milum Jr <git@darkain.com>
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-02-15 14:16:13 -02:00
Hugues Peccatte
f1e140be05 Reduce nested ifs
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-01-12 23:06:04 +01:00
Maurício Meneghini Fauth
25e480666e Fix doc comments alignment
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-07 15:09:32 -02:00
Maurício Meneghini Fauth
23c3579804 Format array declarations
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-07 14:31:39 -02:00
Maurício Meneghini Fauth
4cee0cbc12 Adds space after not (!) and type cast
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-05 21:56:34 -02:00
Maurício Meneghini Fauth
3a7e1503ac Fix some coding standard errors
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-04 19:42:10 -02:00
William Desportes
ca072c96d9
fix #14749 - Uncaught TypeError in routines
Signed-off-by: William Desportes <williamdes@wdes.fr>
2018-11-27 11:57:38 +01:00
ales-bulko
0be9c13689 Fixes #14658 - Regression on multi table query (#14681)
Added functionality to generate SELECT query with JOINs of requested tables. It was mentioned that it's just a bug and it was working in previous versions, but I did not see any code fragments that would make it possible. Please, feel free to suggest any better solution if you don't like that one.

Fixes #14658

Signed-off-by: Aleš Buľko <ales.bulko@student.tuke.sk>
(cherry picked from commit 23ce7cec52)
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-11-26 20:59:58 -02:00
ales-bulko
23ce7cec52 Fixes #14658 - Regression on multi table query (#14681)
Added functionality to generate SELECT query with JOINs of requested tables. It was mentioned that it's just a bug and it was working in previous versions, but I did not see any code fragments that would make it possible. Please, feel free to suggest any better solution if you don't like that one.

Fixes #14658

Signed-off-by: Aleš Buľko <ales.bulko@student.tuke.sk>
2018-11-26 20:34:09 -02:00
Tomas Votruba
38301a6a9f fixup! [cs] remove unused brackets, clean unused property assign
Signed-off-by: Tomas Votruba <tomas.vot@gmail.com>
2018-11-26 17:55:14 +01:00
Tomas Votruba
637fe6de06 [cs] remove unused brackets, clean unused property assign
Signed-off-by: Tomas Votruba <tomas.vot@gmail.com>
2018-11-26 17:54:40 +01:00
Tomas Votruba
bf720bad29 remove unused and fix @param, @var and @return annotation values
Signed-off-by: Tomas Votruba <tomas.vot@gmail.com>
2018-11-24 21:47:26 +01:00
Maurício Meneghini Fauth
d4b4124a5e Remove $GLOBALS['dbi'] from Relation class
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-08-30 19:05:09 -03:00
Maurício Meneghini Fauth
9b69b7936f Merge branch 'QA_4_8'
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-08-15 01:29:26 -03:00
William Desportes
8a7f2c30ef
Fix getDatabasesFull query
Execute: $this->dbi->getDatabasesFull("pma_test")
Fixes missing space after alias

Signed-off-by: William Desportes <williamdes@wdes.fr>
2018-08-06 15:15:32 +02:00
William Desportes
e816e45c18 phpstan level 0 (#14405)
* Fix phpdoc @return

- Fixed @return typehint

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Fix incorrect case on function calls

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Type hint + typo fix

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Fixes

- @return fix
- @var fix
- Class names
- Throws fix
- test/classes/Plugins/Export/ExportSqlTest.php any() invoked with 1 parameter, 0 required
-  libraries/classes/Controllers/Table/TableStructureController.php Array has 2 duplicate keys with value 'columns_list'
- Call parent constructor  libraries/classes/Error.php

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Update config

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Access to an undefined property

- Access to an undefined property PhpMyAdmin\Plugins\Schema\Pdf\PdfRelationSchema::$diagram_row
- Access to an undefined property PhpMyAdmin\Plugins\Schema\Pdf\Pdf::$cMargin
- Undefined properties

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Update config

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Fix bootstrap-phpstan

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Fix typos and phpstan config

Fixes: #14399
Signed-off-by: William Desportes <williamdes@wdes.fr>
2018-06-25 20:34:46 -03:00
Maurício Meneghini Fauth
2d58411bee Some coding style fixes
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-06-18 21:30:06 -03:00
Isaac Bennetch
9b28b02582 Fixes #14400, another Uncaught TypeError
This one in the database structure page when dropping multiple tables.

Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2018-06-16 16:37:09 -04:00
Maurício Meneghini Fauth
2005cca77f Fix methods and properties visibility issues
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 21:02:26 -03:00
Maurício Meneghini Fauth
285e38e931 Fix some PSR-2 coding standard errors
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 09:07:56 -03:00
Maurício Meneghini Fauth
b9c0463d96 Use short array syntax instead of long array syntax
Replaces array() with [].

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 01:42:21 -03:00
Maurício Meneghini Fauth
6cf8ee0831 Enable strict mode in some classes
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-15 01:03:57 -03:00
Michal Čihař
35e13eada7 Merge branch 'QA_4_8' 2018-05-02 12:14:41 +02:00
William Desportes
8af0343bb2 Patch for issue #14246
Signed-off-by: William Desportes <williamdes@wdes.fr>
Signed-off-by: Michal Čihař <michal@cihar.com>
2018-05-02 12:13:49 +02:00
Maurício Meneghini Fauth
a6e313a3d3 Add type declarations to DatabaseInterface
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-04-28 17:11:51 -03:00
Maurício Meneghini Fauth
89c3fa902b Add constant visibility to DatabaseInterface
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-04-28 05:29:41 -03:00
Maurício Meneghini Fauth
e83f739218 Drop support for mysql extension
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-04-12 22:57:05 -03:00
Maurício Meneghini Fauth
d98658187a Replace PhpMyAdmin\Relation static calls
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-03-25 19:32:13 -03:00
Gabriel Caruso
6ff73257e2 Simplify returns
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-16 10:16:56 -02:00
Michal Čihař
1ebf6c4953 Remove references to sourceforge.net issue trackers
We do not use it for years and all issues have been migrated.

Signed-off-by: Michal Čihař <michal@cihar.com>
2018-01-02 13:24:05 +01:00
Gabriel Caruso
a8bd364e02 Clean elses
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2017-12-14 22:02:17 -02:00
Maurício Meneghini Fauth
c930c7a030 Fix coding standard errors
Automatic fixes by phpcbf.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-12-04 13:40:36 -02:00
Maurício Meneghini Fauth
01fd301003 Use 'elseif' keyword istead of 'else if'
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-12-04 13:31:25 -02:00
Michal Čihař
3b6a994dcd Move collation connection setting to user preferences
It is now handled same way as other user settings.

Issue #11688
Issue #13466

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-29 14:16:31 +01:00
Michal Čihař
0f79721570 Remove not needed param from DatabaseInterface::postConnect
It is called only for user link, so there is no need to make that
parameter.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-27 17:00:30 +01:00
Michal Čihař
2bc8afea5f Move storage zeroconfig to the DBI post connect
This way it is executed only when needed.

Issue #11731

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-27 17:00:23 +01:00
Michal Čihař
1f968ce29b Fix setting variable
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-25 10:24:45 +02:00
Michal Čihař
2c248fa83d Fix documentation for DatabaseInterface::getDefinition
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-25 10:21:18 +02:00
Michal Čihař
ae0a259bac Move link parameter as last in getTablesFull
It is currently not used here, so move it to the end.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-25 10:21:18 +02:00
Michal Čihař
33cfe75e9f Return calculated value from isUserType
There is no need to hit the cache again to read the value.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-25 10:21:18 +02:00
Michal Čihař
398e7b8e58 Avoid poluting user cache without database connection
Returning false is obviously faster than dealing with the cache.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-25 10:21:18 +02:00