Commit Graph

64 Commits

Author SHA1 Message Date
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
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
Michal Čihař
5f29ace249 Simplify DatabaseInterface link parameter handling
- check validy only when invoking low level calls
- avoid too early array usage

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-25 10:21:18 +02:00
Michal Čihař
4fe87fb592 Remove usage of $GLOBALS['controllink']
This is now stored internally inside DatabaseInterface instance.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-25 10:21:18 +02:00
Michal Čihař
329ce22b73 Correctly handle fallback control user connection using user parameters
Remember it as CONNECT_CONTROL and avoid running post connect handler.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-25 10:21:18 +02:00
Michal Čihař
60c1b32472 Remove usage of $GLOBALS['userlink']
The links are internal to DatabaseInterface and user link is default.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-25 10:21:18 +02:00
Michal Čihař
dfc6f7bf8e Remember MySQL links internally in the database interface
This should replace $GLOBALS['userlink']/$GLOBALS['controllink'].

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-25 10:21:18 +02:00
Michal Čihař
84bce234b0 Use quotes around timezone name
Otherwise the error message might be confusing.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-23 11:39:49 +02:00
Michal Čihař
fa042eda41 Avoid hard failure on not setting timezone
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-23 11:38:54 +02:00
Michal Čihař
5d9e124449 Move timezone setup to the DatabaseInterface
Issue #11731

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-23 11:34:49 +02:00
Michal Čihař
088bdec7f5 Avoid trying to get warnings for non saved queries
This leads to command out of sync error.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-10 13:12:12 +02:00
Michal Čihař
9c9c22e516 Load SQL parser context in DatabaseInterface::postConnect
Issue #11731

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-10 12:10:40 +02:00
Michal Čihař
d574aede08 Bind Types to DatabaseInterface
This wayt it's automatically passed with DBI.

Issue #11731

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-10 12:05:02 +02:00
Maurício Meneghini Fauth
f8bd078088 Fix code standard errors
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-30 18:19:09 -03:00
Michal Čihař
4e01371cd2 Log warnings count in debug log
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-28 14:58:47 +02:00
Maurício Meneghini Fauth
1d4125f15c Add array type declarations
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-24 23:49:59 -03:00
Michal Čihař
a82f8fc768 Move databaase interface load to static method
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-06 14:46:56 +02:00