Commit Graph

139 Commits

Author SHA1 Message Date
William Desportes
9f0fc40cdb
Merge branch 'QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-04-02 13:40:28 +02:00
William Desportes
c781a7af75
Fix #16784 - Add a space between .second and .double CSS classes
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-04-02 12:55:12 +02:00
Maurício Meneghini Fauth
d83abf63e7
Use PSR-12 for control structures spacing
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-05 15:27:03 -03:00
Maurício Meneghini Fauth
0b8edc5bde
Use PSR-12 for namespace use statements
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-05 14:18:35 -03:00
William Desportes
66f38555d4
Ref #14801 - Remove plain HTML for PHP code for ShowDatabasesNavigationAsTree option
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-12-07 10:31:11 +01:00
William Desportes
dfce335134
Some text code improvements
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-12-07 01:03:03 +01:00
William Desportes
d63a72ad51
Fixes #16278 - Remove underscore prefix from property names
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-08-06 15:46:39 +02:00
Maurício Meneghini Fauth
3b285ff17e Use identical operator for non-empty strings
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-10 18:06:29 -03:00
Maurício Meneghini Fauth
e81146e4b3 Remove useless return annotations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-07 10:30:27 -03:00
William Desportes
4f6a1fc161
Fix coding standard issues after merge of #16226
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-06-27 18:13:45 +02:00
William Desportes
d6a1e4aee2
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-06-26 19:19:57 +02:00
William Desportes
425c1c32a7
Fix #16226 - Error 500 after copying a table
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-06-26 19:11:53 +02:00
William Desportes
055a9bf3bc
Be sure to cast the result and not a possibly undefined index that would send a notice
Ref: 490d731d6c

Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-06-05 14:03:13 +02:00
William Desportes
7623fed14a
Fix all found errors and add typehints if possible on NavigationTree class
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-06-02 23:50:49 +02:00
William Desportes
62baf0b8ea
Change Node::getChild return to ?Node
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-06-02 23:10:35 +02:00
William Desportes
6266583e63
Add some typehints on NavigationTree
Ref: #16158

Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-06-02 09:18:51 +02:00
William Desportes
490d731d6c
Add some fallbacks if the data is not available
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-31 01:25:23 +02:00
William Desportes
a1a6dd99ea
Move vPath, aPath, pos to paths_nav using data-* attributes
Ref: d944f0851e
Ref: aec59d5007

Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-31 00:58:16 +02:00
William Desportes
aec59d5007
Move pos3_name and pos3_value to pos3_nav using data-* attributes
Ref: d944f0851e

Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-31 00:47:11 +02:00
William Desportes
d944f0851e
Move pos2_name and pos2_value to pos2_nav using data-* attributes
Note: data-* are standard attributes

I did not move the back-end part so it is easier to find the places to refactor calls

Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-31 00:41:32 +02:00
Maurício Meneghini Fauth
f4582e083e Use early exit when possible
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-27 00:35:24 -03:00
Maurício Meneghini Fauth
3ae05c785d Use short list syntax and single line arrays
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-26 03:32:59 -03: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
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
18b7622b6f
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-03-06 08:27:45 +01:00
Simon Vikstrom
e472b8bbc4
Fix "Uncaught TypeError: urlencode() expects parameter 1 to be string, int given in"
If a user creates two tables prefixed with number__... like
2020__abc
2020__cde

then phpmyadmin will group then, the key will end up being an integer instead of a string and  PHP will error out on it.

Signed-off-by: Simon Vikstrom <pullreq@devsn.se>
2020-03-06 08:18:11 +01:00
William Desportes
cd9dd3ab92
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-02-22 20:29:02 +01:00
Rahul Gurung
ac358d45ae
Fix #15810 - the modal heading
Co-Authored-by: William Desportes <williamdes@wdes.fr>
In respect for the PR owner I am only co-autor but re-did all the work.
Signed-off-by: Rahul Gurung <gurungrahul2@gmail.com>
2020-02-22 20:04:48 +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
6b7af13f8f Reference global funcs and consts via use statement
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-23 00:33:24 -03:00
William Desportes
95eb48fc8e
Merge #15823 - Ref #15792 - Fixed deprecated jquery selectors
Ref: #15792
Pull-request: #15823
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-22 19:10:05 +01: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
Yash Bothra
98dc941ce5 #15792 Fixed deprecated :eq selector
Signed-off-by: Yash Bothra <yashrajbothra786@gmail.com>
2020-01-21 01:17:01 +05:30
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
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
William Desportes
851d524cf4
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-12 18:15:33 +01:00
William Desportes
502ded328e
Merge #15778 - Fix - #15773 a view named 'views' adds an expand button
Pull-request: #15778
Fixes: #15773
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-12 17:55:50 +01:00
Yash Bothra
6cac79b867 #15773 fixed unexpected grouping
Signed-off-by: Yash Bothra <yashrajbothra786@gmail.com>
2020-01-12 13:13:41 +05:30
William Desportes
6650498f2e
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-10 22:00:08 +01:00
William Desportes
6981910c8c
Fix #15772 - Error code 500 during pagination in table overview
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-10 21:40:03 +01:00
William Desportes
fa01cea3f2
Add phpdoc blocks for phpstan
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-12-29 15:28:18 +01:00
William Desportes
51f292beab
Improve some params and return types marked as mixed
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-12-29 14:33:49 +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
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
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
7ac1d21c70 Fix some PHPStan level 2 errors
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-05 19:50:24 -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
1f472fb58d
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-10-30 23:57:12 +01:00
William Desportes
cbdc5c0e83
Merge branch 'QA_4_9' into QA_5_0
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-10-30 23:52:18 +01:00
William Desportes
128d3a09a0
Fix #15540 - Uncaught TypeError: htmlspecialchars() in NavigationTree
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-10-30 23:47:45 +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
74ac30fa55 Use the router for navigation.php
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-08-19 23:04:55 -03:00
Maurício Meneghini Fauth
df48b1dab4 Fix some errors detected by PHPStan
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-08-01 03:26:28 -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
64c1b26bac
Use strict compare for booleans
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-06-22 17:41:54 +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
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
Maurício Meneghini Fauth
990f801123 Use camel case names in Navigation classes
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-11 20:55:34 -03:00
Hugues Peccatte
4b628b6553 Replace class name as string by ":class"
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-05-07 22:56:59 +02:00
Nitish Bahl
6a43cccf20 Add title for group in navigation bar
Closes: #14977

Signed-off-by: Nitish Bahl <nitishbahl24@gmail.com>
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-05-03 21:39:18 -03:00
Saurabh Srivastava
b2bfebd709 Add icon and details only to column view in navigation tree (#14910)
Fixes #14890

Signed-off-by: Saurabh Srivastava <saurabhsrivastava312@gmail.com>
2019-05-01 15:15:49 -03:00
William Desportes
40cc2dc813
Fix @var comments to match the phpdoc reference
See: http://docs.phpdoc.org/references/phpdoc/tags/var.html

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-05-01 10:54:43 +02:00
Maurício Meneghini Fauth
0811724040 Extract HTML from NavigationTree::renderPath()
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-04-24 15:10:26 -03:00
Maurício Meneghini Fauth
5254ec1b65 Refactor Navigation\NavigationTree
- Extract HTML from renderState() and renderDbSelect()
- Use DI for $dbi instead of global
- Fix tests

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-04-24 02:25:48 -03:00
Maurício Meneghini Fauth
7eb2bbc102 Remove libraries/check_user_privileges.inc.php
Replaces with CheckUserPrivileges::getPrivileges

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-22 18:18:21 -02:00
Hugues Peccatte
f06883d2a7 Remove useless parenthesis
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-01-20 01:23:53 +01: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
38e5b12c1c Define an absolute path to use for require statements
Fixes #6167

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-12-22 14:37:31 -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
76d8bfdafa Merge branch 'QA_4_8'
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-12-12 21:04:19 -02:00
Madhura Jayaratne
752d544805
Merge pull request #262 from phpmyadmin/bug260
Fix #260 Stored Cross-Site Scripting (XSS) in navigation tree
2018-12-08 10:45:03 +11:00
Eddie Chang
b293ff5f23 Fix https://github.com/phpmyadmin/phpmyadmin-security/issues/260 Stored Cross-Site Scripting (XSS) in navigation tree
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2018-12-07 16:28:48 +11:00
Maurício Meneghini Fauth
b4e1862740 Retrieve parameters from $_POST in navigation
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-11-10 20:48:58 -02:00
Isaac Bennetch
fab796bda9 Fixing some Uncaught TypeErrors, related to #14608
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2018-09-06 13:43:47 -04: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
9dbae0a9ed Enable strict mode in Navigation classes
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-16 01:09:16 -03:00
Gabriel Caruso
a8bd364e02 Clean elses
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2017-12-14 22:02:17 -02: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ř
d2d32651bc Replace empty() by strlen()
In order to fix operation with database or table called 0.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-02 15:53:44 +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
Maurício Meneghini Fauth
a2b08bae7b Refactor check_user_privileges to static methods
Refactor check_user_privileges.lib.php functions to static methods and move logic to check_user_privileges.inc.php.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-11 22:09:05 -03:00
Maurício Meneghini Fauth
67753d579c Fix class not found
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-07-20 09:37:39 -03:00
Maurício Meneghini Fauth
dc1407ca66 Move navigation classes to PhpMyAdmin namespace
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-07-19 21:52:26 -03:00