Commit Graph

125012 Commits

Author SHA1 Message Date
Liviu-Mihail Concioiu
31222bb151 Fix to match master
Signed-off-by: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com>
2024-07-23 04:29:11 +02:00
Liviu-Mihail Concioiu
a5a3e94c9b Fix badges and urls
Signed-off-by: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com>
2024-07-23 04:16:23 +02:00
Maurício Meneghini Fauth
a55dc7f741
Merge #19234 Validate *_structure_or_data param when exporting
- Closes #19234

- Fixes #19213

This is not the best fix, but will avoid generating an invalid file.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-07-20 14:41:02 -03:00
Maurício Meneghini Fauth
587d185bb7
Validate *_structure_or_data param when exporting
- Fixes #19213

This is not the best fix, but will avoid generating an invalid file.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-07-18 16:07:46 -03:00
Maurício Meneghini Fauth
c8525a89d8
Merge #19203 Fix Query Generator single quotes and backslashes
- Closes #19203

Hello 👋

This PR fixes the generated query when the criteria text contains single quotes or backslashes.

For now it only escapes the first `single quote` and the first `backslash`, which generates an invalid query.

![Screenshot from 2024-06-19 18-49-43](https://github.com/phpmyadmin/phpmyadmin/assets/60013703/264f2fc9-8d7c-47be-8114-153f6dfbda2f)

After merging this PR it will escape all the `single quotes` and all the `backslashes`.

![Screenshot from 2024-06-19 18-44-15](https://github.com/phpmyadmin/phpmyadmin/assets/60013703/b1050188-7750-4b9e-90a6-a57a6c1f90f6)

- phpMyAdmin version: 5.2.2-dev, 6.0.0-dev

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-07-17 12:37:08 -03:00
Maurício Meneghini Fauth
bc22629b34
Merge #19181 Query generator support for IN() and NOT IN()
- Closes #19181

Hellooo 👋🏻

In this PR I have added `Query Generator` support to `IN()` and `NOT IN()`.

This is what it generates for now on both `IN()` and `NOT IN()`, which is not valid.

![Screenshot 2024-05-26 031847](https://github.com/phpmyadmin/phpmyadmin/assets/60013703/5f295cd7-eb9f-4d4a-8b98-20edfe4be640)

This how it will looks after merging this PR, generating a valid one.

> Separate the values by commas

As you can see I have added a hint that shows only when choosing `IN()` or `NOT INT()`.

![Screenshot 2024-05-26 033921](https://github.com/phpmyadmin/phpmyadmin/assets/60013703/7c0e77dd-8e82-4ac0-8c26-bc5457a038e2)

- phpMyAdmin version: 5.2.2-dev, 6.0.0-dev

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-07-17 12:33:04 -03:00
faissaloux
95866fd8cf
Query generator support for IN() and NOT IN()
Query Generator IN() support

Signed-off-by: faissaloux <fwahabali@gmail.com>

Query Generator NOT IN() support

Signed-off-by: faissaloux <fwahabali@gmail.com>

fix hint duplicates

Signed-off-by: faissaloux <fwahabali@gmail.com>

dont escape single quote on IN() and NOT IN()

Signed-off-by: faissaloux <fwahabali@gmail.com>

makes linter happy

Signed-off-by: faissaloux <fwahabali@gmail.com>

refactor

Signed-off-by: faissaloux <fwahabali@gmail.com>
2024-07-17 12:32:04 -03:00
Maurício Meneghini Fauth
cd1604345c
Merge #19167 Fix Query Generator criteria on column *
- Closes #19167

When choosing `*` in the column we can't use it in condition. This generates a non-valid query.

![Screenshot from 2024-05-15 16-45-48](https://github.com/phpmyadmin/phpmyadmin/assets/60013703/b6d28c2f-cb23-44c2-bf03-6b26c4c6f1fa)

To fix this issue I have added another select in the criteria area where we can choose the column (* not included) that we want the criteria to be applied on

![Screenshot from 2024-05-15 16-50-52](https://github.com/phpmyadmin/phpmyadmin/assets/60013703/ac8bf739-436a-4f37-a50b-afd8b4823cfe)

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-07-17 12:12:45 -03:00
faissaloux
6aa461cb52
Fix Query Generator criteria on column *
add op column

Signed-off-by: faissaloux <fwahabali@gmail.com>

use op column to generate condition

Signed-off-by: faissaloux <fwahabali@gmail.com>

var -> const

Signed-off-by: faissaloux <fwahabali@gmail.com>
2024-07-17 12:12:16 -03:00
Maurício Meneghini Fauth
185d086f01
Merge #19163 Fix Query Generator IS NULL / IS NOT NULL
- Closes #19163

Hellooo 👋🏻

In this PR I fixed the bug in the `Query Generator`  that generates a non-valid query when using `IS NULL` and `IS NOT NULL`.

As you can see it adds the criteria string before `IS NULL`  which is empty in this case (Same thing for `IS NOT NULL`).
Which is not a valid query. 

![Screenshot from 2024-05-14 21-07-52](https://github.com/phpmyadmin/phpmyadmin/assets/60013703/16be3b2c-d7e7-4ffd-a37b-04e1793f87fa)

Valid 
![Screenshot from 2024-05-14 21-10-06](https://github.com/phpmyadmin/phpmyadmin/assets/60013703/882cd744-577d-49b3-8106-bc3f651a9f85)

[Screencast from 14-05-24 21:53:10.webm](https://github.com/phpmyadmin/phpmyadmin/assets/60013703/2c6b308f-9f26-40fe-a0ea-2c0e09dacc0f)

- phpMyAdmin version: 5.2.2-dev, 6.0.0-dev

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-07-17 12:04:21 -03:00
faissaloux
506d2c561b
fix Query Generator IS NULL / IS NOT NULL
Signed-off-by: faissaloux <fwahabali@gmail.com>

hide criteria on operators without arg

clear criteria input when hide it
2024-07-17 12:03:43 -03:00
Maurício Meneghini Fauth
ed1ca20848
Merge #19221 Show query stats for count(*) query
- Closes #19221
- Fixes #16869

Treat `SELECT COUNT(*) ...` query more like a normal select query.

If no group by is included (always only one row) then, like before, no
navigation is shown. Otherwise it shows with navigation like any other
select.
Before this PR the `nav_bar` property controlled the navigation and
the query duration, now the new `query_stats` property allows to show
the stats without navigation.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-07-16 18:20:34 -03:00
Maurício Meneghini Fauth
7af58fc2b1
Merge #19200 Add fractional seconds to current_timestamp()
Add fractional seconds to current_timestamp().

Fixes #19199

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-07-13 12:47:04 -03:00
Liviu-Mihail Concioiu
02b508276e
Add fractional seconds to current_timestamp()
Signed-off-by: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com>
2024-07-13 12:45:34 -03:00
Maurício Meneghini Fauth
bd3598cf28
Upgrade JavaScript dependencies
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-07-13 12:34:27 -03:00
Maurício Meneghini Fauth
44ab18a38a
Fix scripts/check-release-excludes.sh
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-07-13 12:26:15 -03:00
sebastians17
0e523fb31c
Translated using Weblate (Polish)
Currently translated at 90.6% (3106 of 3427 strings)

[ci skip]

Translation: phpMyAdmin/5.2
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/pl/
Signed-off-by: sebastians17 <sebastians117.ss@gmail.com>
2024-07-09 16:09:17 +02:00
Maurício Meneghini Fauth
358f7c0c43
Upgrade ramsey/composer-install GH action to v3
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-07-08 14:37:21 -03:00
Maximilian Krög
2a4fb46391
Show query stats for count(*) query
Signed-off-by: Maximilian Krög <maxi_kroeg@web.de>
2024-07-05 00:04:49 +02:00
Maurício Meneghini Fauth
cc37776964
Merge pull request #19218 from liviuconcioiu/resize
Fix textarea resize horizontally - Bootstrap theme
2024-07-03 20:19:47 -03:00
Liviu-Mihail Concioiu
2fc2cb11f2 Fix textarea resize horizontally
Signed-off-by: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com>
2024-07-03 13:49:49 +02:00
Ricky From Hong Kong
aa145f3de0
Translated using Weblate (Chinese (Traditional))
Currently translated at 97.3% (3335 of 3427 strings)

[ci skip]

Translation: phpMyAdmin/5.2
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/zh_Hant/
Signed-off-by: Ricky From Hong Kong <lamricky11@hotmail.com>
2024-07-03 09:27:15 +02:00
Ricky From Hong Kong
dc98d1cc09
Translated using Weblate (Chinese (Traditional))
Currently translated at 96.5% (3309 of 3427 strings)

[ci skip]

Translation: phpMyAdmin/5.2
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/zh_Hant/
Signed-off-by: Ricky From Hong Kong <lamricky11@hotmail.com>
2024-07-02 15:24:34 +02:00
Liviu-Mihail Concioiu
bb8006e8a1 Fix textarea resize horizontally
Signed-off-by: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com>
2024-07-02 14:49:32 +02:00
Ricky From Hong Kong
f8dd8d3475
Translated using Weblate (Chinese (Traditional))
Currently translated at 96.4% (3305 of 3427 strings)

[ci skip]

Translation: phpMyAdmin/5.2
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/zh_Hant/
Signed-off-by: Ricky From Hong Kong <lamricky11@hotmail.com>
2024-06-27 10:10:06 +02:00
Ivan
073abbcc2f
Translated using Weblate (Ukrainian)
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/uk/
Signed-off-by: Ivan <ivan47044704@gmail.com>
2024-06-24 20:09:14 +02:00
Maurício Meneghini Fauth
4f67631d48
Fix undefined variables in table/zoom_search/result_form.twig
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-06-22 17:34:21 -03:00
faissaloux
81dffc5b4f fix escapeSingleQuote()
Signed-off-by: faissaloux <fwahabali@gmail.com>
2024-06-19 18:53:26 +01:00
Maurício Meneghini Fauth
0631cdf07f
Merge #19141 Add cookie prefix '-__Secure-' to cookies
Fixes #18608

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-06-16 20:14:07 -03:00
martin762
cb56b7fe45
Add cookie prefix '-__Secure-' to cookies
The PR will modify the 'GetCookieName' functtion by hard coding the prefix ' __Secure-' to each cookie name when 'isHttps()' is true, Apparently the prefix will be recognise
d and enforced by most browsers (ignored by the older ones).Update Config.php

The raison d'aitre for this PR is contained in my issue # 18608.

This PR will replace the line 953, part of the GetCookieName function :
return $cookieName . ( $this->isHttps ? '_https' : '' );

with the amended line:
return ( $this->isHttps() ? '__Secure-' : '’ ) . $cookieName . ( $this->isHttps() ? '_https' : ‘’ );

Signed-off-by: martin762 <martin762green@btinternet.com>
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-06-16 20:04:37 -03:00
Maurício Meneghini Fauth
7baf4f8f3c
Merge #19188 Simulate query fixes
Fixes #19187

Depends on https://github.com/phpmyadmin/sql-parser/pull/560 to work
without regression in the case of a condition `0` because now the
query is parsed and built again to remove comments.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-06-16 11:55:04 -03:00
Ricky From Hong Kong
1cb4390a2b
Translated using Weblate (Chinese (Traditional))
Currently translated at 96.4% (3305 of 3427 strings)

[ci skip]

Translation: phpMyAdmin/5.2
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/zh_Hant/
Signed-off-by: Ricky From Hong Kong <lamricky11@hotmail.com>
2024-06-14 20:09:23 +00:00
Burak Yavuz
efbf2f3e94
Translated using Weblate (Turkish)
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/tr/
Signed-off-by: Burak Yavuz <hitowerdigit@hotmail.com>
2024-06-14 20:09:22 +00:00
Ricky From Hong Kong
cfbd72df8e
Translated using Weblate (Chinese (Traditional))
Currently translated at 95.9% (3288 of 3427 strings)

[ci skip]

Translation: phpMyAdmin/5.2
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/zh_Hant/
Signed-off-by: Ricky From Hong Kong <lamricky11@hotmail.com>
2024-06-13 18:09:18 +02:00
Ricky From Hong Kong
2782c241ac
Translated using Weblate (Dutch)
Currently translated at 99.9% (3426 of 3427 strings)

[ci skip]

Translation: phpMyAdmin/5.2
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/nl/
Signed-off-by: Ricky From Hong Kong <lamricky11@hotmail.com>
2024-06-13 18:09:17 +02:00
Ricky From Hong Kong
59586f088f
Translated using Weblate (Azerbaijani)
Currently translated at 45.4% (1557 of 3427 strings)

[ci skip]

Translation: phpMyAdmin/5.2
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/az/
Signed-off-by: Ricky From Hong Kong <lamricky11@hotmail.com>
2024-06-13 18:09:15 +02:00
Maurício Meneghini Fauth
e7983661ec
Update JS dependencies
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-06-12 15:27:02 -03:00
Maurício Meneghini Fauth
105dd39a3a
Merge #19189 - Fix sorting with group by etc
Fixes #18075

Also fix the check if limit needs to be removed.
`$analyzedSqlResults['limit']` is a `bool`, never `null`;

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-06-07 10:41:01 -03:00
Maurício Meneghini Fauth
a38f06ef08
Merge #19152 - Add custom rows value to select
Add custom page size to browse table when coming from search view

Fixes #18394

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-06-06 10:55:36 -03:00
Maurício Meneghini Fauth
c66cdc26a9
Merge pull request #19192 from MauricioFauth/routes-cache
Fix routes cache validation

- Fixes #19086
2024-06-03 20:23:16 -03:00
Maurício Meneghini Fauth
ece6f4da0b
Fix routes cache validation
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-06-03 20:04:59 -03:00
Masahiro Fujimoto
7df158991d
Translated using Weblate (Japanese)
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/ja/
Signed-off-by: Masahiro Fujimoto <mfujimot@gmail.com>
2024-06-03 04:09:15 +00:00
Maximilian Krög
bf10893215
Fix column sorting with GROUP BY
Signed-off-by: Maximilian Krög <maxi_kroeg@web.de>
2024-06-01 18:14:34 +02:00
Maximilian Krög
3b84890770
Fix simulating query with -- comment
Signed-off-by: Maximilian Krög <maxi_kroeg@web.de>
2024-06-01 00:58:42 +02:00
Maximilian Krög
6d917b5b7f
Fix simulate multiple queries with ; in a string
Signed-off-by: Maximilian Krög <maxi_kroeg@web.de>
2024-06-01 00:16:35 +02:00
Maurício Meneghini Fauth
962507835f
Merge pull request #19146 from MoonE/limit-subquery-order
Fix column sorting with limit subquery

Fixes #16817
2024-05-31 17:38:25 -03:00
Hotripak
6c02c78d25
Translated using Weblate (Ukrainian)
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/uk/
Signed-off-by: Hotripak <hotr1pak@gmail.com>
2024-05-31 21:42:23 +02:00
hoanghuy309
2ba2f5c533
Translated using Weblate (Vietnamese)
Currently translated at 83.5% (2863 of 3427 strings)

[ci skip]

Translation: phpMyAdmin/5.2
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/vi/
Signed-off-by: hoanghuy309 <hoanghuy309@gmail.com>
2024-05-31 07:09:17 +02:00
hoanghuy309
0eddf28d7b
Translated using Weblate (Vietnamese)
Currently translated at 83.3% (2856 of 3427 strings)

[ci skip]

Translation: phpMyAdmin/5.2
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/vi/
Signed-off-by: hoanghuy309 <hoanghuy309@gmail.com>
2024-05-29 12:37:37 +02:00
Maurício Meneghini Fauth
9a3d2b8ca7
Merge pull request #19174 from faissaloux/prevent-use-alias-with-asterisk
Fix `Query Generator` column alias with asterisk
2024-05-24 11:31:55 -03:00