Commit Graph

128306 Commits

Author SHA1 Message Date
Nova
9bc956fbd1
Translated using Weblate (English (United Kingdom))
Currently translated at 97.5% (3324 of 3406 strings)

[ci skip]

Translation: phpMyAdmin/Development
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/en_GB/
Signed-off-by: Nova <luna.bowley@gmail.com>
2024-03-08 09:41:55 +01:00
Maurício Meneghini Fauth
87e0c21303
Merge pull request #19029 from kamil-tekiela/Refactor-import-3
Use enum instead of constants in Import
2024-03-07 14:46:00 -03:00
Kamil Tekiela
eb9be36606 Use enum instead of constants
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2024-03-07 18:18:24 +01:00
Salvador Domingues
def925efe1
Translated using Weblate (Portuguese)
Currently translated at 94.8% (3229 of 3406 strings)

[ci skip]

Translation: phpMyAdmin/Development
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/pt/
Signed-off-by: Salvador Domingues <salvadordomingues@gmail.com>
2024-03-07 05:09:42 +01:00
Nabin Ghimire
b846b89ef7
Translated using Weblate (Nepali)
Currently translated at 1.9% (66 of 3406 strings)

[ci skip]

Translation: phpMyAdmin/Development
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/ne/
Signed-off-by: Nabin Ghimire <nnabinn@hotmail.com>
2024-03-07 05:09:39 +01:00
Kristijan \"Fremen\" Velkovski
746a188057
Translated using Weblate (Macedonian)
Currently translated at 27.5% (939 of 3406 strings)

[ci skip]

Translation: phpMyAdmin/Development
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/mk/
Signed-off-by: "Kristijan \"Fremen\" Velkovski" <me@krisfremen.com>
2024-03-06 05:39:15 +01:00
Kamil Tekiela
60fb1a8504 Use array_fill
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2024-03-05 22:45:13 +01:00
Maurício Meneghini Fauth
1eefe72f98
Merge pull request #19025 from kamil-tekiela/intval
Replace function casts with normal casts
2024-03-04 15:18:26 -03:00
Kamil Tekiela
54b5464ec2 Replace function casts with normal casts
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2024-03-03 15:07:57 +01:00
Maurício Meneghini Fauth
856d316332
Merge pull request #18812 from kamyweb/role_based_auth
Add role based auth for MySQL 8.x and compatibles
2024-03-03 01:48:58 -03:00
Luca Camillo
457192102f
Add role based auth for MySQL 8.x and compatibles
add role based auth for mysql 8.x or compatible like mariadb/aws rds aurora mysql

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

better cache management

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

null for unsupported

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

add caching and check if role is supported based on server version

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

checking isRoleSupported before query

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

implement tests for getCurrentRolesAndHost / getCurrentRoles functions

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

use different name for host of role and keep value inside session cache

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

fix role checks on mariadb

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

Simplify code

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

ignore NONE as result of CURRENT_ROLE()

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

fix comments

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>
2024-03-03 01:38:01 -03:00
Maurício Meneghini Fauth
a82c7fcb6f
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-03-03 00:46:10 -03:00
phpMyAdmin bot
713ae87e85 Update po files
[ci skip]

Signed-off-by: phpMyAdmin bot <bot@phpmyadmin.net>
2024-03-03 00:18:43 +00:00
Luca Camillo
78335aac87
Add role based auth for MySQL 8.x and compatibles (#18814)
* add role based auth for mysql 8.x or compatible like mariadb/aws rds aurora mysql

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

* Using cache and check server version

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

* implement tests for getCurrentRolesAndHost / getCurrentRoles functions

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

* fix role checks on mariadb

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

* Simplify code + ignore NONE as result of CURRENT_ROLE()

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

* Fix tests

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>

Fixes #18782

---------

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Co-authored-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-03-02 19:31:03 -03:00
Maurício Meneghini Fauth
ba29aa6e82
Merge pull request #19022 from MauricioFauth/navigation-node-name-issue
Fix case where tables from wrong db is loaded in navigation
2024-02-29 17:42:23 -03:00
Maurício Meneghini Fauth
0048963013
Fix case where tables from wrong db is loaded in navigation
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-02-29 16:23:30 -03:00
Kamil Tekiela
8e4443b17b
Applying suggestions from static analysis tools (#19013)
* Drop array keys from lists

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

* Import UrlTest

When it doesn't exist in Prod, the code will still work the same.
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Drop redundant return [];

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

* Fix object access checks

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

* Use strict comparison

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

* Int keys should be specified as integers

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

* Use empty string check instead of strlen

Potential null deprecations are replaced with loose condition.

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

* Use stripos instead of *substr

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

* Simplify substr's 3rd param

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

* Remove unnecessary defaults

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

* Replace isZeroBasedArray with array_is_list

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

* Simplify texEscape()

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

* Simplify exportZeroBasedArray()

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

* Replace for loop with array_diff

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

* Replace for with foreach

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

* Remove nullable param in backquoteCompat

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

* Use null-coalescing operator

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

* Inline $result variable

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

* Turn $event into a constant

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

* Move selectDb outside the loop

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

* Fix code style order of operation

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

* Remove unnecessary isset argument

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

* Remove line break

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

* Use foreach instead of for

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

---------

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2024-02-27 12:29:02 -03:00
Maurício Meneghini Fauth
e68e814e57
Update PHP dependencies
- Upgrading composer/ca-bundle (1.4.0 => 1.4.1)
  - Upgrading phpdocumentor/type-resolver (1.8.1 => 1.8.2)
  - Upgrading phpstan/phpdoc-parser (1.25.0 => 1.26.0)
  - Upgrading phpstan/phpstan-phpunit (1.3.15 => 1.3.16)
  - Upgrading phpunit/phpunit (10.5.10 => 10.5.11)
  - Upgrading roave/security-advisories (dev-latest 1f77ae7 => dev-latest aafb723)
  - Upgrading vimeo/psalm (5.22.1 => 5.22.2)

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-02-26 12:17:24 -03:00
Maurício Meneghini Fauth
c84191a568
Merge pull request #19012 from MauricioFauth/unit-tests
Add some unit tests
2024-02-26 11:37:27 -03:00
Maurício Meneghini Fauth
cbff3f344e
Add unit tests for UrlRedirector
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-02-25 15:54:12 -03:00
Maurício Meneghini Fauth
ecafb167ee
Add code coverage for some value objects
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-02-25 14:40:00 -03:00
Maurício Meneghini Fauth
70425bae12
Add unit test for Session::secure()
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-02-25 14:10:05 -03:00
phpMyAdmin bot
a5b72495e6 Update po files
[ci skip]

Signed-off-by: phpMyAdmin bot <bot@phpmyadmin.net>
2024-02-25 00:18:55 +00:00
Maurício Meneghini Fauth
c30a9eec63
Merge pull request #19010 from MauricioFauth/unit-tests
Add some unit tests
2024-02-24 19:32:18 -03:00
Maurício Meneghini Fauth
c07d04a8c8
Merge pull request #19008 from MauricioFauth/template-cache-trigger-error-removal
Remove trigger_error from Template class
2024-02-24 14:02:57 -03:00
Maurício Meneghini Fauth
02b6e0f988
Add unit test for DatabaseInterface::getColumn()
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-02-24 14:01:11 -03:00
Kristijan \"Fremen\" Velkovski
7d8dba4470
Translated using Weblate (Macedonian)
Currently translated at 27.3% (931 of 3407 strings)

[ci skip]

Translation: phpMyAdmin/Development
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/mk/
Signed-off-by: "Kristijan \"Fremen\" Velkovski" <me@krisfremen.com>
2024-02-24 03:49:58 +01:00
Kristijan \"Fremen\" Velkovski
9e7890e566
Translated using Weblate (Macedonian)
Currently translated at 28.5% (979 of 3427 strings)

[ci skip]

Translation: phpMyAdmin/5.2
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/mk/
Signed-off-by: "Kristijan \"Fremen\" Velkovski" <me@krisfremen.com>
2024-02-24 03:49:57 +01:00
Maurício Meneghini Fauth
13b32109a1
Add some unit tests for UserPrivilegesFactory class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-02-23 23:41:01 -03:00
Maurício Meneghini Fauth
e0d42d2862
Remove trigger_error from Template class
This will remove the error:

> Error while working with template cache: Unable to create the cache directory

This does not fix the cache issue, but removes the warning.

The current behavior is to disable the cache when there's an issue with
it. However this has bad performance.

The issue is that sometimes Twig generates a different cache key than
the warmed up one and tries to write a new cache, but that's not the
desired behavior.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-02-23 19:09:28 -03:00
Maurício Meneghini Fauth
cc62444d5c
Merge pull request #19007 from MauricioFauth/tests-dir-rename
Rename tests/classes and tests/selenium to tests/unit and tests/end-to-end
2024-02-23 13:30:02 -03:00
Maurício Meneghini Fauth
9a0d34b01d
Rename tests/selenium to tests/end-to-end
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-02-23 13:29:07 -03:00
Maurício Meneghini Fauth
606f66b5df
Rename tests/classes to tests/unit
This directory is for unit tests only, so let's rename it to unit to be
more clear.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-02-23 13:29:07 -03:00
Robert Johnson Nallori
54f14eaa6c
Fix Error When adding a user on MariaDB (#19002)
* Fix Error When adding a user on MariaDB

Signed-off-by: Robert Johnson Nallori <johnson361@gmail.com>

* Fix coding standard and static analysis issues

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>

* Add unit tests

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>


Fixes #18989
---------

Signed-off-by: Robert Johnson Nallori <johnson361@gmail.com>
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Co-authored-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-02-23 13:19:37 -03:00
Maurício Meneghini Fauth
cc56e4c81a
Merge pull request #19006 from MauricioFauth/composer-update
Update PHP dependencies
2024-02-22 12:39:27 -03:00
Maurício Meneghini Fauth
3b685ee7ce
Update PHP dependencies
- Upgrading fidry/cpu-core-counter (1.0.0 => 1.1.0)
  - Upgrading laminas/laminas-diactoros (3.3.0 => 3.3.1)
  - Upgrading phpdocumentor/type-resolver (1.8.0 => 1.8.1)
  - Upgrading phpmyadmin/sql-parser (dev-master c4efadf => dev-master 48bd285)
  - Upgrading phpstan/phpstan (1.10.57 => 1.10.59)
  - Upgrading roave/security-advisories (dev-latest 794e58e => dev-latest 1f77ae7)
  - Upgrading spatie/array-to-xml (3.2.2 => 3.2.3)
  - Upgrading squizlabs/php_codesniffer (3.8.1 => 3.9.0)
  - Upgrading vimeo/psalm (5.21.1 => 5.22.1)

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-02-22 12:26:24 -03:00
Maurício Meneghini Fauth
a6a2862d71
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-02-21 21:18:24 -03:00
Maurício Meneghini Fauth
7bc3da7f7b
Merge pull request #19001 from johnson361/UNIQUE_key_18940
Fix Cannot create a UNIQUE key from More dropdown

Fixes #18940
2024-02-21 21:08:42 -03:00
Maurício Meneghini Fauth
2b1f21ef07
Remove unused parameter from Table\StructureController::displayStructure
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-02-21 21:05:48 -03:00
Robert Johnson Nallori
55fd04832d
Fix Cannot create a UNIQUE key from More dropdown
Signed-off-by: Robert Johnson Nallori <johnson361@gmail.com>
2024-02-21 20:47:40 -03:00
PAUL MICHIEL VAN DER BLONK
61cf618233
Translated using Weblate (English (United Kingdom))
Currently translated at 95.9% (3269 of 3407 strings)

[ci skip]

Translation: phpMyAdmin/Development
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/en_GB/
Signed-off-by: PAUL MICHIEL VAN DER BLONK <blonkm@gmail.com>
2024-02-20 23:32:57 +01:00
Andrzej Pauli
178dd8a2ba
Translated using Weblate (Polish)
Currently translated at 90.1% (3089 of 3427 strings)

[ci skip]

Translation: phpMyAdmin/5.2
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/pl/
Signed-off-by: Andrzej Pauli <andrzej.pauli@gmail.com>
2024-02-20 23:32:56 +01:00
PAUL MICHIEL VAN DER BLONK
e9203d9f0e
Translated using Weblate (Dutch)
Currently translated at 100.0% (3427 of 3427 strings)

[ci skip]

Translation: phpMyAdmin/5.2
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/nl/
Signed-off-by: PAUL MICHIEL VAN DER BLONK <blonkm@gmail.com>
2024-02-20 23:32:53 +01:00
PAUL MICHIEL VAN DER BLONK
9a7f384540
Translated using Weblate (English (United Kingdom))
Currently translated at 98.9% (3392 of 3427 strings)

[ci skip]

Translation: phpMyAdmin/5.2
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/en_GB/
Signed-off-by: PAUL MICHIEL VAN DER BLONK <blonkm@gmail.com>
2024-02-20 23:32:52 +01:00
Maurício Meneghini Fauth
3acf78df7f
Merge pull request #18994 from kamil-tekiela/Refactor-import-2
Refactor name generation of file imports
2024-02-18 19:15:21 -03:00
Maurício Meneghini Fauth
58752f926c
Merge pull request #18988 from kamil-tekiela/CentralColumns
Refactor Central columns
2024-02-18 19:09:58 -03:00
Maurício Meneghini Fauth
09cf21915e
Merge branch 'QA_5_2'
Fixes #18930

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-02-18 18:59:28 -03:00
Maurício Meneghini Fauth
4eb4a1a0b7
Merge pull request #18937 from kamil-tekiela/Fix-#18930
Fix import of empty tables from MediaWiki
2024-02-18 18:26:33 -03:00
Hosted Weblate
28aac52c33
Merge branch 'origin/master' into Weblate.
[ci skip]

Translation: phpMyAdmin/Development
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/
2024-02-18 01:19:26 +01:00
Ahmad Fauzan Bagaskoro
da93de1689
Translated using Weblate (Indonesian)
Currently translated at 73.6% (2510 of 3407 strings)

[ci skip]

Translation: phpMyAdmin/Development
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/id/
Signed-off-by: Ahmad Fauzan Bagaskoro <92.ahmadfauzanbagaskoro@gmail.com>
2024-02-18 01:19:25 +01:00