Commit Graph

1617 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
Maurício Meneghini Fauth
021580e518
Merge pull request #18617 from kamil-tekiela/Request-in-favourites
Use Request in FavoriteTableController
2023-08-15 00:14:09 -03:00
Maurício Meneghini Fauth
8cc6db10d7
Merge pull request #18622 from kamil-tekiela/Remove-recasts
Remove redundant casts
2023-08-15 00:03:18 -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
Kamil Tekiela
00367fb7b3 Remove redundant casts
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-08-14 22:10:35 +01:00
Kamil Tekiela
77218a10c5 Use Request in FavoriteTableController
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-08-12 20:23:34 +01:00
Maurício Meneghini Fauth
93fa48e286
Refactor the ServerRequest::getRoute() method
Extracts the redirection to database and table pages to the
HomeController for an actual redirection instead of an implicit one.

Removes the Application::getRequest() method as the ServerRequest object
should be an immutable object.

Adds a Routing::$route static variable to be used at the places that the
ServerRequest object is not available.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-12 01:45:12 -03:00
Maurício Meneghini Fauth
a2b8c17c30
Pass a ServerRequest object to the 2FA plugin
Removes the Application::getRequest() call for the WebAuthn plugin.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-11 11:50:17 -03:00
Maurício Meneghini Fauth
bf94058602
Add a Template property to the ResponseRenderer class
Passes the Template object to its dependencies.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-09 15:14:23 -03:00
Maurício Meneghini Fauth
5f9ba2e1d1
Extract Relation and Template dependencies from UserPreferences
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-09 15:04:34 -03:00
Maurício Meneghini Fauth
f70c730edd
Extract Template dependency from Setup\MainController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-09 13:53:13 -03:00
Maurício Meneghini Fauth
c0d04b6895
Add a Response object to ResponseRenderer class
Uses a Response object to handle the HTTP headers and HTTP status code.

This makes the AbstractNetworkTestCase obsolete and removes it.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-07 22:27:48 -03:00
Maurício Meneghini Fauth
a520e235eb
Move Core::sendHeaderLocation() to ResponseRenderer::redirect()
Removes the IIS specific logic.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-06 17:43:42 -03: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
Maurício Meneghini Fauth
4dbe1b6e4b
Merge pull request #18562 from MoonE/scale-data
Refactor / rename in Gis
2023-08-05 20:18:57 -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
Maurício Meneghini Fauth
bfc3852e61
Create Http\Response::write() method to write to the body
This method helps when data is written to the body of the response and
the response object is returned immediately.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-05 10:50:53 -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
41996de092
Merge pull request #18594 from kamil-tekiela/Fix-SA-reported-issues
Fix SA reported issues
2023-08-04 20:05:20 -03:00
Maurício Meneghini Fauth
e436ad23ec
Merge pull request #18598 from kamil-tekiela/charset_connection
Remove globals charset_connection & collation_connection
2023-08-04 20:00:10 -03:00
Maurício Meneghini Fauth
f3b57f6278
Change export to server file to use redirection after save
Removes the need of calling other controllers.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-08-04 17:52:25 -03:00
Kamil Tekiela
47959814a4 Remove globals charset_connection & collation_connection
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-08-04 21:32:05 +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
William Desportes
eae978f3f3
Merge branch 'QA_5_2'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2023-08-03 15:01:31 +02:00
William Desportes
7c975030b9
Fix #18592 - Remove instruction to remove the pma_collation_connection cookie removed in 4.8.0
Ref: 3b6a994dcd
Fixes: #18592

Signed-off-by: William Desportes <williamdes@wdes.fr>
2023-08-03 15:00:19 +02:00
Maurício Meneghini Fauth
45b58d7eea
Refactor JavaScriptMessagesController to return a Response object
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-30 17:22:18 -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
bd3d0a6c03
Merge pull request #18585 from kamil-tekiela/$triggers-!==-]
Redesign Triggers::getDetails()
2023-07-28 18:37:03 -03:00
Kamil Tekiela
93263d9ce3 Redesign Triggers::getDetails()
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-07-28 22:28:24 +01:00
Maurício Meneghini Fauth
2c90f397e1
Refactor the Setup\MainController controller
Changes the __invoke() method so it returns a Response object.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-07-26 21:33:43 -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
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
Maximilian Krög
43ee18c007
Add factory method to get gis object from wkt data
Signed-off-by: Maximilian Krög <maxi_kroeg@web.de>
2023-07-25 21:10:33 +02: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
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