Commit Graph

405 Commits

Author SHA1 Message Date
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
Maurício Meneghini Fauth
d89bb277d0
Replace some 'echo' with ResponseRenderer::addHTML() method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-04 22:07:25 -03:00
Maurício Meneghini Fauth
a55a4cba2b
Extract dbi calls from body_for_table_summary template
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-28 19:58:03 -03: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
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
Maurício Meneghini Fauth
c8a50637f4
Remove Template and ResponseRenderer dep from Routines class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-24 15:04:53 -03:00
Maurício Meneghini Fauth
212e115c2e
Extract response handling from Routines::handleRequestCreateOrEdit()
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-24 13:51:29 -03:00
Maurício Meneghini Fauth
3cc69d6860
Extract response handling from Routines::handleExecuteRoutine()
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-24 12:08:02 -03:00
Maurício Meneghini Fauth
2623661650
Inline the Routines::handleExecute() method
Moves the response handling to controller.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-24 11:29:02 -03:00
Maurício Meneghini Fauth
d35586a562
Inline the Routines::handleEditor() method
Moves the response handling to the controller.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-24 11:20:06 -03:00
Maurício Meneghini Fauth
60b8f6c61a
Inline the Routines::export() method
Moves the response handling to the controller.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-23 18:28:28 -03:00
Maurício Meneghini Fauth
32b92568f3
Inline the Events::getEditorForm() method
Moves the response handling to the controller.
Removes the dependency on ResponseRenderer and Template from the Events
class.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-23 18:28:28 -03:00
Maurício Meneghini Fauth
27f4665a4f
Inline the Events::sendEditor() method
Moves the response handling to the controller.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-23 18:28:28 -03:00
Maurício Meneghini Fauth
5a67090559
Extract response handling from Events::handleEditor()
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-23 18:28:27 -03:00
Maurício Meneghini Fauth
bcd55bb1ff
Inline the Events::export() method
Moves the response handling to the controller.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-23 18:28:27 -03:00
Maurício Meneghini Fauth
eaad8d8a1c
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-15 15:19:35 -03:00
William Desportes
8b4a158a1b
Ref #16005 - Remove loading on each request favorites and recents
Signed-off-by: William Desportes <williamdes@wdes.fr>
2023-07-14 17:47:30 +02:00
William Desportes
d1019373ce
Fix route /database/structure/favorite-table - it does not require a db name
Signed-off-by: William Desportes <williamdes@wdes.fr>
2023-07-14 17:47:25 +02: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
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
Maurício Meneghini Fauth
f23ab54ca9
Move the Export class to the Export namespace
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-06-28 12:28:38 -03:00
Maurício Meneghini Fauth
de58d27326
Remove .pma-fieldset and related CSS classes
Replaces most of them with the Bootstrap card component.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-06-11 00:37:39 -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
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
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
231ec1ba8b Remove QBE
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-19 11:21:46 +01:00
Kamil Tekiela
15a83c32af $db in addNewRelation()
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-12 22:50:32 +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
20d206a705
Merge pull request #18412 from kamil-tekiela/ShortenElseIfRector
Shorten else/if to elseif
2023-05-12 11:16:00 -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
176645be7b Shorten else/if to elseif
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-12 00:12:58 +01:00
Evgeny Skorlov
4530585ad3
Replace superglobals with serverrequest in controllers
Signed-off-by: Evgeny Skorlov <eugene@skorlov.name>

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-04-12 15:49:31 -03:00
Kamil Tekiela
74a0c26129 Create DTO for TrackedData
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-04-07 13:46:26 +01:00
Kamil Tekiela
89fb8ee371 Remove count() boolean check
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-04-05 16:53:49 +01:00
Kamil Tekiela
218d59c661 Move getTrackedData to Tracking
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-04-04 23:13:18 +01:00
Kamil Tekiela
73d91f9852 Move deleteTracking to Tracking
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-04-04 22:01:25 +01:00
Maurício Meneghini Fauth
6a2c12bdc8
Add missing traversable type hints
Replace array type hint with mixed[] type hint, since it means the same.
This way it's possible to require traversable type hint for new code.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-04-02 01:32:12 -03:00
Maurício Meneghini Fauth
dd885dc7b8
Use single-line arrays when possible
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-03-27 17:39:17 -03:00
Maurício Meneghini Fauth
e5698c85e9
Require single line for function calls
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-03-26 23:10:10 -03:00
Maurício Meneghini Fauth
437215cab2
Rename variables to use camel case format
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-03-26 21:47:50 -03:00
Kamil Tekiela
b5ae50454d Optimize getTrackingIcon
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-03-22 13:07:22 +00:00
Maurício Meneghini Fauth
c7855f6e95
Create the PhpMyAdmin\Replication namespace
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-03-20 14:16:01 -03:00
Kamil Tekiela
924fcc79f9 Refactor logic for getting Tracking status
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-03-17 22:36:21 +00:00
Kamil Tekiela
c0b367cc57 Create Tracking namespace
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-03-17 22:35:32 +00:00
Kamil Tekiela
3ecf14df34 Fixing erroneous params
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-03-17 12:47:43 +00:00
Kamil Tekiela
555c6798eb Add native param types
Includes TypeHints.UnionTypeHintFormat

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-03-17 12:45:18 +00:00