Browse Source

Move L10n::getCurrentLang() calls to DI::l10n()->getCurrentLang() calls

tags/2020.03
nupplaPhil 8 months ago
parent
commit
d83f6335eb
No known key found for this signature in database GPG Key ID: D8365C3D36B77D90
5 changed files with 5 additions and 5 deletions
  1. +1
    -1
      mod/settings.php
  2. +1
    -1
      src/Module/Admin/Site.php
  3. +1
    -1
      src/Module/Install.php
  4. +1
    -1
      src/Util/Temporal.php
  5. +1
    -1
      update.php

+ 1
- 1
mod/settings.php View 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, [


+ 1
- 1
src/Module/Admin/Site.php View 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'))) {


+ 1
- 1
src/Module/Install.php View 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, [


+ 1
- 1
src/Util/Temporal.php View 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,


+ 1
- 1
update.php View 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) {


Loading…
Cancel
Save