]> git.mxchange.org Git - friendica.git/commitdiff
Move L10n::getCurrentLang() calls to DI::l10n()->getCurrentLang() calls
authornupplaPhil <admin@philipp.info>
Sat, 18 Jan 2020 19:55:41 +0000 (20:55 +0100)
committernupplaPhil <admin@philipp.info>
Sun, 19 Jan 2020 15:31:19 +0000 (16:31 +0100)
mod/settings.php
src/Module/Admin/Site.php
src/Module/Install.php
src/Util/Temporal.php
update.php

index 412748aab570d6ad367cd03d8bf8f0a5a821a53e..4a19e3e84964dc555de2cf09cbd546a18db71953 100644 (file)
@@ -1165,7 +1165,7 @@ function settings_content(App $a)
        }
 
        /* Installed langs */
-       $lang_choices = L10n::getAvailableLanguages();
+       $lang_choices = DI::l10n()->getAvailableLanguages();
 
        /// @TODO Fix indending (or so)
        $o .= Renderer::replaceMacros($stpl, [
index aab66a7221d71689cb485b4e039374496b751543..9a7aa5956c62ee003015178f3a4274ab5ef92505 100644 (file)
@@ -414,7 +414,7 @@ class Site extends BaseAdminModule
                parent::content($parameters);
 
                /* Installed langs */
-               $lang_choices = L10n::getAvailableLanguages();
+               $lang_choices = DI::l10n()->getAvailableLanguages();
 
                if (strlen(Config::get('system', 'directory_submit_url')) &&
                        !strlen(Config::get('system', 'directory'))) {
index 4b0809e1f99b19ad4ed26fff6b7993fa57df2a27..2e8d088b0878b9b8c8e7ba11867b6767025fdd4e 100644 (file)
@@ -255,7 +255,7 @@ class Install extends BaseModule
 
                        case self::SITE_SETTINGS:
                                /* Installed langs */
-                               $lang_choices = L10n::getAvailableLanguages();
+                               $lang_choices = DI::l10n()->getAvailableLanguages();
 
                                $tpl    = Renderer::getMarkupTemplate('install_settings.tpl');
                                $output .= Renderer::replaceMacros($tpl, [
index 4bc2b03d1b3108feb38f64865890a14bc466af98..9df0413fbc25604021ee2cdaaa51046cc7198ffd 100644 (file)
@@ -219,7 +219,7 @@ class Temporal
                // First day of the week (0 = Sunday)
                $firstDay = DI::pConfig()->get(local_user(), 'system', 'first_day_of_week', 0);
 
-               $lang = substr(L10n::getCurrentLang(), 0, 2);
+               $lang = substr(DI::l10n()->getCurrentLang(), 0, 2);
 
                // Check if the detected language is supported by the picker
                if (!in_array($lang,
index 330e6da10d7fb3c1a7a934098e4b57933d43c4eb..6d575438384a0692abd951724f98b492335b18be 100644 (file)
@@ -300,7 +300,7 @@ function update_1298()
        $keys = ['gender', 'marital', 'sexual'];
        foreach ($keys as $translateKey) {
                $allData = DBA::select('profile', ['id', $translateKey]);
-               $allLangs = L10n::getAvailableLanguages();
+               $allLangs = DI::l10n()->getAvailableLanguages();
                $success = 0;
                $fail = 0;
                foreach ($allData as $key => $data) {