Skip to content

Commit

Permalink
Use config_get_global for fallback_language
Browse files Browse the repository at this point in the history
Issue #23626
  • Loading branch information
atrol committed Nov 13, 2017
1 parent f5618b1 commit d3eb764
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/soap/mc_api.php
Expand Up @@ -551,7 +551,7 @@ function mci_related_issue_as_array_by_id( $p_issue_id ) {
function mci_get_user_lang( $p_user_id ) {
$t_lang = user_pref_get_pref( $p_user_id, 'language' );
if( $t_lang == 'auto' ) {
$t_lang = config_get( 'fallback_language' );
$t_lang = config_get_global( 'fallback_language' );
}
return $t_lang;
}
Expand Down
2 changes: 1 addition & 1 deletion core/email_api.php
Expand Up @@ -1261,7 +1261,7 @@ function email_send( EmailData $p_email_data ) {
# @@@ should this be the current language (for the recipient) or the default one (for the user running the command) (thraxisp)
$t_lang = config_get_global( 'default_language' );
if( 'auto' == $t_lang ) {
$t_lang = config_get( 'fallback_language' );
$t_lang = config_get_global( 'fallback_language' );
}
$t_mail->SetLanguage( lang_get( 'phpmailer_language', $t_lang ) );

Expand Down
4 changes: 2 additions & 2 deletions core/lang_api.php
Expand Up @@ -135,7 +135,7 @@ function lang_get_default() {
* @return string
*/
function lang_map_auto() {
$t_lang = config_get( 'fallback_language' );
$t_lang = config_get_global( 'fallback_language' );

if( isset( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ) {
$t_accept_langs = explode( ',', $_SERVER['HTTP_ACCEPT_LANGUAGE'] );
Expand Down Expand Up @@ -218,7 +218,7 @@ function lang_push( $p_lang = null ) {
# The results from auto are always the local user, not what the
# override wants, unless this is the first language setting
if( ( 'auto' == $t_lang ) && ( 0 < count( $g_lang_overrides ) ) ) {
$t_lang = config_get( 'fallback_language' );
$t_lang = config_get_global( 'fallback_language' );
}

$g_lang_overrides[] = $t_lang;
Expand Down

0 comments on commit d3eb764

Please sign in to comment.