]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Debug/Localtime.php
Group selection: Respect "pubmail" and ignore atchived or blocked contacts
[friendica.git] / src / Module / Debug / Localtime.php
index 36eaa17ac87254df049785655b73c809d5671bf4..0d78f08d796a990ac0c5099983421f3c44bb807a 100644 (file)
@@ -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  = '<h3>' . L10n::t('Time Conversion') . '</h3>';
                $output .= '<p>' . L10n::t('Friendica provides this service for sharing events with other networks and friends in unknown timezones.') . '</p>';
@@ -39,9 +39,9 @@ class Localtime extends BaseModule
                        $output .= '<p>' . L10n::t('Converted localtime: %s', $app->data['mod-localtime']) . '</p>';
                }
 
-               $output .= '<form action ="' . $app->getBaseURL() . '/localtime?f=&time=' . $time . '" method="post" >';
+               $output .= '<form action ="' . $app->getBaseURL() . '/localtime?time=' . $time . '" method="post" >';
                $output .= '<p>' . L10n::t('Please select your timezone:') . '</p>';
-               $output .= Temporal::getTimezoneSelect(defaults($_REQUEST, 'timezone', Installer::DEFAULT_TZ));
+               $output .= Temporal::getTimezoneSelect(($_REQUEST['timezone'] ?? '') ?: Installer::DEFAULT_TZ);
                $output .= '<input type="submit" name="submit" value="' . L10n::t('Submit') . '" /></form>';
 
                return $output;