1
0
Fork 0
Commit graph

57 commits

Author SHA1 Message Date
3b2946f98f
Replace header() with $response->setHeader() at BaseModule 2021-11-27 12:40:56 +01:00
537b74f307
Inherit ApiResponse from Response 2021-11-27 12:40:54 +01:00
561aba18e3
Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
8bdd90066f
Make BaseModule a real entity
- Add all dependencies, necessary to run the content (baseUrl, Arguments)
- Encapsulate all POST/GET/DELETE/PATCH/PUT methods as protected methods inside the BaseModule
- Return Module content ONLY per `BaseModule::run()` (including the Hook logic there as well)
2021-11-27 12:40:36 +01:00
b5d2d32b44
Split and delete ModuleController
- $moduleName is part of the argument string => App\Arguments
- $isBackend boolean already part of App\Mode::isBackend()
- $module is now the direct return of App\Router::getModule()
- ModuleController::run() moved to BaseModule::run()
2021-11-27 12:39:45 +01:00
ba26a56f3d Add missing variable argument operator in BaseModule->t
- This was causing to wrongly pass the variable arguments as an array of variable arguments to L10n->t
2021-11-24 10:57:05 -05:00
645e4edc63
Revert "Revert "Replace Module::init() with Constructors""
This reverts commit 89d6c89b67.
2021-11-19 20:18:48 +01:00
89d6c89b67
Revert "Replace Module::init() with Constructors" 2021-11-19 07:23:23 -05:00
dab9e13c69
Replace $this->l10n->t() with $this->t() for Modules 2021-11-18 23:23:58 +01:00
ce578a7745
Replace Module::init() with Constructors 2021-11-17 22:14:33 +01:00
8f741c8b78
Remove afterpost() handling 2021-11-16 22:40:38 +01:00
5879535822
Switch static::$parameters to $this->parameters 2021-11-14 23:49:07 +01:00
489cd0884a
Make BaseModule methods dynamic 2021-11-14 23:49:06 +01:00
714f0febc4
Replace $parameters argument per method with static::$parameters 2021-11-14 23:49:05 +01:00
018275919c
Create interface for static Module calls 2021-11-14 23:30:04 +01:00
f6faae5bb1 Replace deprecated log calls 2021-10-20 18:53:52 +00:00
c81e81dc8d "getUserId" is now "getLoggedInUserId" 2021-08-09 20:33:46 +00:00
15b93b4459 "getUserNickname" is now "getLoggedInUserNickname" 2021-08-09 19:48:39 +00:00
b8fa75b2dd Changed function name 2021-08-09 15:29:07 +00:00
fc283ab928 Remove direct calls to App->user 2021-08-08 10:14:56 +00:00
6236870aa4 Add all required HTTP methods 2021-05-08 09:14:19 +00:00
Balázs Úr
054c301ef0 Update copyright 2021-03-29 08:40:20 +02:00
9b38abc32c Re-allow anonymous use of CSRF tokens 2020-08-24 12:02:24 -04:00
b4d59c25a8 Return early if $a->user is absent in BaseModule
- Address https://github.com/friendica/friendica/issues/8877#issuecomment-660266026
2020-08-20 09:32:20 -04:00
383ddb10ed Create new page_tabs template
- Replace explicit tabs in profile contacts page with new template
2020-08-06 22:59:09 -04:00
cb03418937 Add checks for $a->user existence
- Variable can be empty/null in many cases
2020-07-09 15:09:07 -04:00
nupplaPhil
23c64b9a11
Add license info at Friendica classes 2020-02-09 15:45:36 +01:00
6d7f0a6fd8 Remove duplicate profile_uid key in App->profile array 2020-01-20 07:32:46 -05:00
d6efc90194
cleanup namespace usages for L10n 2020-01-19 16:31:33 +01:00
5dfee31108
Move L10n::t() calls to DI::l10n()->t() calls 2020-01-19 16:31:16 +01:00
0a4119adaf @brief is removed completely 2020-01-19 06:05:23 +00:00
f0eea6f875
Remove get_app() in favor of DI::app() 2020-01-04 23:42:01 +01:00
8e6973b774
Refactor deprecated App::internalRedirect() to DI::baseUrl()->redirect() 2019-12-29 20:17:43 +01:00
388b963714
Replace BaseObject class with DI::* calls 2019-12-29 20:17:38 +01:00
a5b5f0e455 removed space 2019-11-05 22:03:02 +00:00
aecac2cb54 Readded removed comments 2019-11-05 22:01:45 +00:00
8c03bdada9 parameters now are having a default value and are optional 2019-11-05 21:48:54 +00:00
bd62d548db Added parameters 2019-11-05 20:22:54 +00:00
abe6724629 Added parameter to rawContent 2019-11-05 19:16:26 +00:00
c8316bfe57 Use Dice instantiation to access App\Arguments
- Remove App->args accessors
2019-10-07 16:16:42 -04:00
11ad0acd28 Add accessor for App->args in App and BaseModule 2019-10-07 14:27:46 -04:00
Philipp Holzer
0e5cb88888
Add router config
- Introduce route.config.php structure
- Adding config loader for routes
- Adapt Module class (separation of duties)
- Add tests
2019-09-29 11:57:27 +02:00
41f781c52a Replace System::httpExit() by HTTPException throwing 2019-05-02 11:37:09 -04:00
187ea9ab21 Update BaseModule::rawContent to add sample implementation 2019-04-14 08:57:55 -04:00
895b3abf32 Remove/replace killme() with *exit() 2019-01-21 09:49:17 -05:00
5e1ceb57de Escape global namespaced get_app() calls
- Add deprecated status
2019-01-03 21:27:36 -05:00
Adam Magness
50da89d861 Logger Levels
update logger levels in calls
2018-10-30 09:58:45 -04:00
Adam Magness
14fde5dc9b Log function
implement log() function.
2018-10-30 09:57:14 -04:00
d00ddc01af
Split goaway to System::externalRedirectTo() and App->internalRedirect() 2018-10-22 22:13:35 +02:00
2ef81108b3
Renamed System::redirect() to $a->redirect() 2018-10-22 22:13:22 +02:00