Commit Graph

105 Commits

Author SHA1 Message Date
William Desportes
d042b6e2bb
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-24 23:25:07 +01:00
William Desportes
3db8949ad3
Fix #15200 - server-side HTTPS detection misses support for Forwarded HTTP Extension (RFC 7239)
Fixes: #15200
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-24 22:56:55 +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
676f48349a Reference global funcs and consts via use statement
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-21 22:13:36 -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
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
77518d341e Remove unused use statements
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-11 21:20:58 -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
William Desportes
a9df8a4dbb
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-11-05 23:15:34 +01:00
William Desportes
9e90099ffa
Merge branch 'QA_4_9' into QA_5_0
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-11-05 23:10:52 +01:00
Hugues Peccatte
164c15854d Add unit tests for Util::isInteger
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-11-03 20:51:54 +01:00
Hugues Peccatte
69a4061441 Refactor duplicated methods
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-11-01 19:20:15 +01: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
dc7372fb99 Fix URL query issues with Util::getScriptNameForOption
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-07-22 17:30:18 -03:00
Maurício Meneghini Fauth
682e7a160e Use the router for database structure page
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-07-18 14:33:43 -03: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
c9129e9bd8 Remove unnecessary string concatenation
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-12 17:47:33 -03:00
Maurício Meneghini Fauth
c049dfa7a6 Replace alias functions with their respective functions
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-12 14:49:47 -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
3399e5babd
Fix spatial functions
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-04-16 11:11:28 +02:00
William Desportes
252aebef48
Merge branch 'QA_4_8'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-03-26 23:37:53 +01:00
William Desportes
c1c22ff32f
Fix style issues
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-03-26 22:48:08 +01:00
William Desportes
76cbe9f961
Merge branch 'QA_4_8'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-03-26 21:05:09 +01:00
William Desportes
9dd940c58a
Fix whitespace
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-03-24 18:35:37 +01:00
Anton Mokrousov
e41af9d6df Fixed issue #15077
Signed-off-by: Anton Mokrousov <settingx@mail.ru>
2019-03-24 21:36:25 +07:00
Maurício Meneghini Fauth
92cc67fbf7 Replace assertContains() with assertStringContainsString()
Using assertContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringContainsString() or assertStringContainsStringIgnoringCase() instead.
Using assertNotContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringNotContainsString() or assertStringNotContainsStringIgnoringCase() instead.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-02-24 16:32:28 -03:00
Maurício Meneghini Fauth
182491a73f Add void return type declaration for tests
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-02-22 21:33:55 -03:00
Maurício Meneghini Fauth
1532675036 Fix Util::formatNumber tests
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-15 16:01:21 -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
9eba565bf4 Remove unnecessary HTML closing tags
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-12-19 00:12:54 -02:00
Maurício Meneghini Fauth
d7affca556 Fix uncaught TypeError in Util::printableBitValue
Fixes #14718

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-11-12 21:50:42 -02:00
Maurício Meneghini Fauth
c04982d5c5 Upgrade PHPUnit to v7
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-11-03 20:47:45 -03:00
Maurício Meneghini Fauth
8b2336a989 Remove unsed Util method
Removes PhpMyAdmin\Util::containsNonPrintableAscii static method.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-10-17 21:42:07 -03:00
Gabriel Caruso
c1435d5b07
Use Null Coalesce Operator
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-09-07 22:59:37 -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
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
baf0985e5f Fix phpcs errors
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-18 01:59:38 -03:00
Maurício Meneghini Fauth
dc8c92bfd8 Enable strict mode in test files
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-16 04:36:04 -03:00
Maurício Meneghini Fauth
3d8eafd68a Extract HTTP requests related methods
Move HTTP requests related methods from Util class to
PhpMyAdmin\Utils\HttpRequest class.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-01-22 17:31:57 -02:00
Maurício Meneghini Fauth
79ac814805 Fix UtilTest global dependencies
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-12-19 01:03:40 -02:00
Michal Čihař
0b5b287049 Merge branch 'QA_4_7' 2017-12-15 11:10:00 +01:00
Michal Čihař
bed6fb4ebd Avois passing extension to Util::getImage
We do not use it anyway for quite some time and this way it's less
processing to generate the img tag.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-27 14:24:42 +01:00
Michal Čihař
fd9150460e Use fully CSS based icons
- themes can easier customize their look
- this better deals with previous JS code who relied on sprites (fixes #13815)

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-27 13:47:43 +01:00
Michal Čihař
f29640c5d8 Remove $strip_img parameter from Util::linkOrButton
It did not behave as documented for ages, it only influenced
whether additional text was added to the link.

Callers should use parameters to Util::getIcon to achieve this
(if it is actually needed somewhere)

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-16 15:41:27 +01:00
Michal Čihař
50c65bc3fb Remove no longer needed $new_form from Util::linkOrButton
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-16 15:33:53 +01:00
Michal Čihař
816c42665a Add tests for Util::linkOrButton
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-16 15:33:53 +01:00