- added more type-hints
- cleaned up some files (curly braces, spaces)
This commit is contained in:
Roland Häder 2022-06-23 07:16:22 +02:00
parent a1e17968d1
commit 04df7f6e05
No known key found for this signature in database
GPG key ID: C82EDE5DDFA0BA77
74 changed files with 603 additions and 529 deletions

View file

@ -7,6 +7,7 @@
*
*/
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\Core\Renderer;
use Friendica\DI;
@ -16,14 +17,17 @@ function rendertime_install() {
DI::config()->set('system', 'profiler', true);
}
function rendertime_uninstall() {
function rendertime_uninstall()
{
DI::config()->delete('system', 'profiler');
}
function rendertime_init_1(&$a) {
function rendertime_init_1(App $a)
{
}
function rendertime_addon_admin(&$a, &$o) {
function rendertime_addon_admin(App $a, &$o)
{
$t = Renderer::getMarkupTemplate("admin.tpl", "addon/rendertime/");
$o = Renderer::replaceMacros($t, [
@ -33,7 +37,8 @@ function rendertime_addon_admin(&$a, &$o) {
]);
}
function rendertime_addon_admin_post(&$a) {
function rendertime_addon_admin_post(App $a)
{
DI::config()->set('rendertime', 'callstack', $_POST['callstack'] ?? false);
DI::config()->set('rendertime', 'minimal_time', $_POST['minimal_time'] ?? 0);
}