Commit Graph

363 Commits

Author SHA1 Message Date
Maurício Meneghini Fauth
d70644ecf0 Extract results nav buttons into table template
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-03-13 21:26:15 -03:00
Maurício Meneghini Fauth
5950693fb3
Fix possible undefined globals
Related to https://github.com/phpmyadmin/phpmyadmin/pull/17427.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-03-10 18:05:21 -03:00
Maurício Meneghini Fauth
1438cb211e
Replace global keyword with $GLOBALS
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-03-07 17:31:11 -03:00
Maurício Meneghini Fauth
c482cd47ef
Remove gridEditingConfig JS global
- Uses data attribute instead.
- Uses Bootstrap's tooltip instead of the jQuery plugin.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-14 23:19:29 -03:00
Maurício Meneghini Fauth
bc58521a17
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-07 13:55:53 -03:00
Maurício Meneghini Fauth
b59d46bc8d
Fix some Psalm errors after #17059 merge
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-07 13:44:53 -03:00
Philip Kroloq
8bd45c8ec0
fixed missing navigation buttons in view result tables
Signed-off-by: Philip Kroloq <kroloq@web.de>
(cherry picked from commit 09aaa10b33)
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-07 13:03:06 -03:00
Maurício Meneghini Fauth
b5096a42e5
Merge pull request #17059 from kroloq/fix-navigation-buttons-on-views
Fix #17055 - missing navigation buttons on views
2022-02-07 13:01:02 -03:00
William Desportes
a7b222db8a
Merge branch 'origin/QA_5_2'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2022-02-06 15:47:17 +01:00
William Desportes
65c9f49c1e
Merge branch 'QA_5_1' into QA_5_2
Signed-off-by: William Desportes <williamdes@wdes.fr>
2022-02-06 15:45:57 +01:00
Kamil Tekiela
b5a6729886
Fix #17239 - Repeating headers are not working
Ref: 97810b3a21

igned-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-02-06 01:37:22 +01:00
William Desportes
c5dba46ca4
fix a coding standard unsolvable case
Moving the return line did not help, so I removed it

Signed-off-by: William Desportes <williamdes@wdes.fr>
2022-02-04 18:42:33 +01:00
Maurício Meneghini Fauth
dca5b1b893
Create the DisplayParts class
Replaces the displayParts array with the DisplayParts object.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-03 14:42:09 -03:00
William Desportes
4bea65e29a
Merge branch 'QA_5_1' into QA_5_2
Signed-off-by: William Desportes <williamdes@wdes.fr>
2022-02-03 13:47:51 +01:00
William Desportes
3bd3ee074c
Fix #17315 - Unsupported operand types in Results.php
Signed-off-by: William Desportes <williamdes@wdes.fr>
2022-02-03 13:40:20 +01:00
Maurício Meneghini Fauth
0bee94b27e
Merge branch 'QA_5_1-security' into master-security
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-01-11 14:31:56 -03:00
Maurício Meneghini Fauth
02e8588404
Merge branch 'QA_4_9-security' into QA_5_1-security
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-01-10 18:39:23 -03:00
Maurício Meneghini Fauth
0b575ff2e9
Fix URL encryption for Util::linkOrButton method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-01-10 12:19:44 -03:00
Kamil Tekiela
6e8a04c4ab Remove redundant condition
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-01-06 19:38:21 +00:00
Kamil Tekiela
0cd422954b Remove redundant arguments
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-01-06 19:38:21 +00:00
Kamil Tekiela
75b5c3241c Remove optional $onclick parameter
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-01-06 19:38:21 +00:00
Kamil Tekiela
cf16a3c55a Remove redundant parentheses
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-01-06 19:38:21 +00:00
Kamil Tekiela
af4b8938b8 Collapse if statements into one
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-01-06 19:38:21 +00:00
Kamil Tekiela
47a039d70c Implement ResultInterface & MysqliResult
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-31 23:59:24 +00:00
Maurício Meneghini Fauth
8e9dfe79db
Merge pull request #17243 from kamil-tekiela/Refactor-Results.php
Refactor results.php
2021-12-27 09:21:49 -03:00
Kamil Tekiela
e2dc2a9c86 Remove getUnsortedSqlAndSortByKeyDropDown()
This was stupid abstraction. This method did 2 things. When the code that prepares unsorted SQL is moved out of this method, the rest can be absorbed by getSortByKeyDropDown(). This method didn't declare any local variables, it took parameters that were just passed along to other methods. The code to get unsorted SQL was just a single instruction that was self-explanatory. Indexes relied on properties so they didn't need to be a parameter to the other method.

This method only added complexity instead of reducing it.

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-26 23:10:34 +00:00
Kamil Tekiela
7a735ddf92 Redesign CSS class generation
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-26 23:10:34 +00:00
Kamil Tekiela
9969b9d103 $printview global is always null
The variable is not set anywhere in the current codebase.

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-26 23:10:34 +00:00
Kamil Tekiela
acb91c0b34 Refactor Results.php
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-26 23:10:34 +00:00
Kamil Tekiela
97810b3a21 Fix bug #17239
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-26 23:10:34 +00:00
Kamil Tekiela
eba8621881 Use DI for Results.php
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-26 23:10:34 +00:00
Maurício Meneghini Fauth
d84af02945
Create VO classes for each RelationParameters features
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-26 19:17:58 -03:00
Maurício Meneghini Fauth
c4e2582e56
Use TableName for RelationParameters tables
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-26 19:17:57 -03:00
Maurício Meneghini Fauth
44fe103b9c
Remove @access annotations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-22 11:43:45 -03:00
Maurício Meneghini Fauth
2a4b170a34
Merge branch 'QA_5_1'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-21 13:13:09 -03:00
Maurício Meneghini Fauth
c411121fd8
Move Relation classes into the ConfigStorage namespace
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-17 12:09:13 -03:00
Kamil Tekiela
903afe871b Bug fix: SQL string in confirmation popup should not be escaped
The values of < > ' " & are double escaped in the confirmation dialog.
Since the values are inserted via twig into HTML, there is no need to
escape them twice.

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-14 12:22:25 +00:00
Maurício Meneghini Fauth
4c3bf41d56
Use DatabaseName for RelationParameters::db instead of string
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-11 08:10:40 -03:00
Maurício Meneghini Fauth
c4575fd48b
Add methods to check for RelationParameters features
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-11 08:10:40 -03:00
Kamil Tekiela
ce527035c2 PHPStan checkAlwaysTrueCheckTypeFunctionCall fixes
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-08 15:26:52 +00:00
Kamil Tekiela
be87571da6 PHPStan checkAlwaysTrueStrictComparison fixes
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-08 15:26:52 +00:00
Kamil Tekiela
a42803297c
Psalm fixes 3 (#17221)
* Update psalm-baseline.xml

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Small bug fixes

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* non-falsy-string is always true

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* currentSearch property is nullable

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Remove unusued parameter $columnIndex

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Use parameters instead of globals in sendEditor()

The two globals in this method are read-only. There is an unused
parameter in the signature. Let's add one more and use them instead of globals.

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Remove unusued parameter $crlf

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-03 12:40:19 -03:00
Kamil Tekiela
f446e6da88 Remove unused variables
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-03 15:12:56 +00:00
Kamil Tekiela
1270efc2a9
Refactor util.php (#17212)
* Remove extra space

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Remove null checks on properties that cannot be null

The value could be null only if the property exists in stdClass
returned by mysqli but is null. Mysqli doesn't do that. Unless the value
can be null in some other way, this check is redundant.

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Add psalm-return

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Remove $handle parameter of getUniqueCondition()

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Type hint the $row parameter

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

Co-authored-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-02 17:37:09 -03:00
Maurício Meneghini Fauth
857a9d3337
Remove unnecessary @var annotations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-18 12:15:30 -03:00
Maurício Meneghini Fauth
b2a51c4d84
Create the RelationParameters value object
Replaces the $cfgRelation array with the RelationParameters value
object.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-14 18:22:36 -03:00
Maurício Meneghini Fauth
220ed30ef8
Remove printview.css theme files
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-10-31 17:35:55 -03:00
Maurício Meneghini Fauth
3e0856c77b
Remove useless string concatenations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-27 21:40:22 -03:00
Maurício Meneghini Fauth
e9ec9e8b71
Replace rand functions with random_int
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-27 19:05:42 -03:00
Maurício Meneghini Fauth
f00d70cccb
Remove useless whitespaces
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-15 17:05:40 -03:00