Commit Graph

786 Commits

Author SHA1 Message Date
Kamil Tekiela
f58c647271 Refactor $extraData and show_as_php
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-08-15 10:51:07 +01:00
Maurício Meneghini Fauth
9e9611d162
Replace config global with Config singleton
This is as bad as the global variable, however at least will have better
static analysis of it.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-15 01:11:54 -03:00
Kamil Tekiela
95a98ccd04 Constructor property promotion - risky
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-08-14 23:24:49 +01:00
Maurício Meneghini Fauth
f570bf64bf
Pass ServerRequest object to Indexes::doSaveData() method
This removes the need to call Application::getRequest().

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-06 13:17:12 -03:00
Maurício Meneghini Fauth
63e6410728
Refactor the DbTableExists class
- Changes static methods to instance methods
- Extract response handling to the controllers
- Add unit tests for the DbTableExists class
- Remove the AbstractController::hasDatabase() method

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-06 01:42:06 -03:00
Kamil Tekiela
2b4916351e Introduce param $oldIndexName
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-08-05 20:33:20 +01:00
Kamil Tekiela
22c815e647 $request->hasBodyParam('preview_sql')
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-08-05 20:23:54 +01:00
Kamil Tekiela
a8a3986a80 Provide more accurate type hints
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-08-03 20:41:29 +01:00
Kamil Tekiela
3421e591dd in_array should use strict mode
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-08-03 20:41:28 +01:00
Maurício Meneghini Fauth
0b9db09812
Merge pull request #18581 from MauricioFauth/request-is-ajax
Add a isAjax() method to ServerRequest class
2023-07-26 21:14:06 -03:00
Maurício Meneghini Fauth
76d035ae57
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-26 16:58:15 -03:00
Maurício Meneghini Fauth
19dad3b153
Add a isAjax() method to ServerRequest class
This method belongs to the ServerRequest class instead of the
ResponseRenderer class, as it's a request property.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-26 16:01:37 -03:00
Kamil Tekiela
ec453f5eb0 Refactor Relation::getRelationsAndStatus()
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-07-25 22:20:39 +01:00
Kamil Tekiela
fb2953c487 Force string as return type of showCreate()
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-07-24 19:45:24 +01:00
Maurício Meneghini Fauth
8d769908e6
Ignore Infection for mutations that causes error or timeout
Disable log verbosity

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-22 13:54:36 -03:00
Maurício Meneghini Fauth
b0604623d8
Extract PageSettings dependency from controllers
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-06 20:17:34 -03:00
Maurício Meneghini Fauth
95ae4f7612
Extract Config\PageSettings initialization from constructor
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-06 16:37:40 -03:00
Maurício Meneghini Fauth
3abe8ed8d9
Improve Util::formatByteDown() return type hint
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-06-28 22:36:50 -03:00
Maurício Meneghini Fauth
1f935e57f7
Move the Import class to the Import namespace
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-06-28 12:44:04 -03:00
ru-asdx
62a2b7fa34
Replace superglobals with serverrequest in ReplaceController (#18501)
* Replace superglobals with serverrequest in ReplaceController

Signed-off-by: Evgeny Skorlov <eugene@skorlov.name>

* fixes

Signed-off-by: Evgeny Skorlov <eugene@skorlov.name>

---------

Signed-off-by: Evgeny Skorlov <eugene@skorlov.name>
2023-06-26 14:48:40 -03:00
Maurício Meneghini Fauth
22c6a2f9d8
Add a wrapper around the exit language construct
Creates the PhpMyAdmin\ResponseRenderer::callExit() method as a wrapper
to the exit language construct. That makes the tests more correct as the
method will always stop the code execution.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-06-06 21:54:07 -03:00
Maurício Meneghini Fauth
1be42d13de
Create the Identifiers\Identifier interface
Changes Dbal\DatabaseName, Dbal\TableName and Triggers\TriggerName to
implements the new Identifier\Identifier interface.
Moves Dbal\DatabaseName, Dbal\TableName and Triggers\TriggerName to the
Identifiers namespace.
Renames the tryFromValue() and fromValue() methods to just tryFrom() and
from() respectively.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-06-01 19:09:25 -03:00
Maurício Meneghini Fauth
5c9847101c
Merge pull request #18453 from kamil-tekiela/quoteString
Use quoteString in CentralColumns
2023-05-30 14:28:19 -03:00
Maurício Meneghini Fauth
5ea9d2a2dc
Merge pull request #18459 from kamil-tekiela/Removal-of-GLOBALS
Removal of globals
2023-05-30 12:41:27 -03:00
Kamil Tekiela
6dae32cd7a $GLOBALS['warning_messages']
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-27 13:08:54 +01:00
Kamil Tekiela
872410ea1b $GLOBALS['comment']
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-27 13:08:54 +01:00
Kamil Tekiela
4141085204 $GLOBALS['notNull']
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-27 13:08:54 +01:00
Kamil Tekiela
df1aef483e $GLOBALS['indexes']
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-27 13:08:53 +01:00
Kamil Tekiela
9a13768bf9 $GLOBALS['hideOrderTable']
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-27 13:08:53 +01:00
Kamil Tekiela
c215ed7baa $GLOBALS['columns']
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-27 13:08:53 +01:00
Kamil Tekiela
d8e75913c8 $GLOBALS['new_tbl_storage_engine']
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-27 13:08:51 +01:00
Kamil Tekiela
08454dcf2e $GLOBALS['table_alters']
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-27 13:08:03 +01:00
Kamil Tekiela
b481240bb6 $GLOBALS['create_options']
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-27 13:07:19 +01:00
Kamil Tekiela
dc28c432a1 $GLOBALS['row_format']
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-27 13:06:10 +01:00
Kamil Tekiela
cab63eae59 $GLOBALS['show_comment']
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-27 12:27:12 +01:00
Kamil Tekiela
42c3d84701 Assume that selected fields/tables are always string
Otherwise we would already be seeing plenty of errors when the values are used as string. Therefore this array must contain only strings.

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-25 19:54:36 +01:00
Maurício Meneghini Fauth
74b1ffbf8c
Merge the DB and table trigger controllers
They are equivalent in current form.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-05-25 15:39:36 -03:00
Maurício Meneghini Fauth
62ec1bcc2c
Merge pull request #18445 from kamil-tekiela/InsertEdit-pt4
InsertEdit refactoring - part 4
2023-05-24 21:16:01 -03:00
Maurício Meneghini Fauth
44f2b4d5bd
Merge pull request #18390 from ru-asdx/refactor-17769-p2
Replace superglobals with serverrequest in GetFieldController
2023-05-24 15:31:24 -03:00
Kamil Tekiela
7838a42a34 Move buildInsertSqlQuery to Generator
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-23 15:31:46 +01:00
Kamil Tekiela
1d180c5482 Use null as sentinel value in getColumn
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-19 16:33:01 +01:00
Kamil Tekiela
fccaaf65a3 Remove all new Psalm issues
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-19 16:33:01 +01:00
Kamil Tekiela
3b611f3945 Implement ColumnFull DTO
This is MVP. In following commits the DTO will be expanded and improved.

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-19 16:29:34 +01:00
Kamil Tekiela
97da6c9721 Don't catch exception into variable
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-12 23:09:51 +01:00
Kamil Tekiela
4ec3b99ba3
Improve boolean conditions with arrays (#18417)
* Remove empty() on array

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

* Remove boolean count()

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

---------

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-12 15:16:26 -03:00
Maurício Meneghini Fauth
58c3e059c2
Merge pull request #18407 from kamil-tekiela/Useless-foreach
Remove useless foreach
2023-05-12 12:16:47 -03:00
Kamil Tekiela
dc471985b9
Short boolean conditions (#18413)
* Short boolean conditions

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

* Simplify conditions

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

---------

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-12 11:09:21 -03:00
Kamil Tekiela
4a4f8ae063 Remove useless foreach
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-11 23:02:29 +01:00
Evgeny Skorlov
9590ba6bc1 Replace superglobals with serverrequest in GetFieldController with fixes
Signed-off-by: Evgeny Skorlov <eugene@skorlov.name>
2023-05-10 23:03:11 +11:00
Kamil Tekiela
a01eefc4c2 Remove $timestampSeen which was always false
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-04-23 11:20:05 +01:00