]> git.mxchange.org Git - friendica.git/blobdiff - mod/settings.php
Move Temporal::convert() to DateTimeFormat::convert()
[friendica.git] / mod / settings.php
index 2ea6d53343e7a3656dcb60157ffea126c42b47e0..9aa2c0b5b1c452fd701e8b7d4b3cf4e362a1bc38 100644 (file)
@@ -17,7 +17,9 @@ use Friendica\Model\GContact;
 use Friendica\Model\Group;
 use Friendica\Model\User;
 use Friendica\Protocol\Email;
+use Friendica\Util\DateTimeFormat;
 use Friendica\Util\Network;
+use Friendica\Util\Temporal;
 
 function get_theme_config_file($theme)
 {
@@ -538,7 +540,6 @@ function settings_post(App $a)
        if ($openid != $a->user['openid'] || (strlen($openid) && (!strlen($openidserver)))) {
                if (Network::isUrlValid($openid)) {
                        logger('updating openidserver');
-                       require_once 'library/openid.php';
                        $open_id_obj = new LightOpenID;
                        $open_id_obj->identity = $openid;
                        $openidserver = $open_id_obj->discover($open_id_obj->identity);
@@ -631,7 +632,7 @@ function settings_post(App $a)
        if ($name_change) {
                q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s' WHERE `uid` = %d AND `self`",
                        dbesc($username),
-                       dbesc(datetime_convert()),
+                       dbesc(DateTimeFormat::utcNow()),
                        intval(local_user())
                );
        }
@@ -1211,7 +1212,7 @@ function settings_content(App $a)
                '$h_basic'      => L10n::t('Basic Settings'),
                '$username' => ['username',  L10n::t('Full Name:'), $username, ''],
                '$email'        => ['email', L10n::t('Email Address:'), $email, '', '', '', 'email'],
-               '$timezone' => ['timezone_select' , L10n::t('Your Timezone:'), select_timezone($timezone), ''],
+               '$timezone' => ['timezone_select' , L10n::t('Your Timezone:'), Temporal::getTimezoneSelect($timezone), ''],
                '$language' => ['language', L10n::t('Your Language:'), $language, L10n::t('Set the language we use to show you friendica interface and to send you emails'), $lang_choices],
                '$defloc'       => ['defloc', L10n::t('Default Post Location:'), $defloc, ''],
                '$allowloc' => ['allow_location', L10n::t('Use Browser Location:'), ($a->user['allow_location'] == 1), ''],