X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FDebug%2FLocaltime.php;h=0d78f08d796a990ac0c5099983421f3c44bb807a;hb=fd706cf9a7a0c4700838a1f00b12d8fd37323b7c;hp=36eaa17ac87254df049785655b73c809d5671bf4;hpb=1cd7d509396c578f610b259f4508a8bcca574979;p=friendica.git diff --git a/src/Module/Debug/Localtime.php b/src/Module/Debug/Localtime.php index 36eaa17ac8..0d78f08d79 100644 --- a/src/Module/Debug/Localtime.php +++ b/src/Module/Debug/Localtime.php @@ -10,9 +10,9 @@ use Friendica\Util\Temporal; class Localtime extends BaseModule { - public static function post() + public static function post(array $parameters = []) { - $time = defaults($_REQUEST, 'time', 'now'); + $time = ($_REQUEST['time'] ?? '') ?: 'now'; $bd_format = L10n::t('l F d, Y \@ g:i A'); @@ -21,11 +21,11 @@ class Localtime extends BaseModule } } - public static function content() + public static function content(array $parameters = []) { $app = self::getApp(); - $time = defaults($_REQUEST, 'time', 'now'); + $time = ($_REQUEST['time'] ?? '') ?: 'now'; $output = '

' . L10n::t('Time Conversion') . '

'; $output .= '

' . L10n::t('Friendica provides this service for sharing events with other networks and friends in unknown timezones.') . '

'; @@ -39,9 +39,9 @@ class Localtime extends BaseModule $output .= '

' . L10n::t('Converted localtime: %s', $app->data['mod-localtime']) . '

'; } - $output .= '
'; + $output .= ''; $output .= '

' . L10n::t('Please select your timezone:') . '

'; - $output .= Temporal::getTimezoneSelect(defaults($_REQUEST, 'timezone', Installer::DEFAULT_TZ)); + $output .= Temporal::getTimezoneSelect(($_REQUEST['timezone'] ?? '') ?: Installer::DEFAULT_TZ); $output .= '
'; return $output;