Skip to content

Commit

Permalink
* core/lang_api.php
Browse files Browse the repository at this point in the history
  (lang_load_default): oops, not sure what I was thinking... string_cookie is
    the user string cookie not the language


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2013 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Julian Fitzell committed Feb 24, 2003
1 parent 64aa9e5 commit af0bac5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/lang_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: lang_api.php,v 1.13 2003-02-24 09:52:05 jfitzell Exp $
# $Id: lang_api.php,v 1.14 2003-02-24 10:11:06 jfitzell Exp $
# --------------------------------------------------------

###########################################################################
Expand Down Expand Up @@ -57,17 +57,17 @@ function lang_load( $p_lang ) {
# ------------------
# Loads the user's language or, if the database is unavailable, the default language
function lang_load_default() {
$t_user_language = gpc_get_cookie( config_get( 'string_cookie' ) );
$t_cookie_string = gpc_get_cookie( config_get( 'string_cookie' ) );

# Confirm that the user's language can be determined
if ( db_is_connected() && !is_blank( $t_user_language ) ) {
if ( db_is_connected() && !is_blank( $t_cookie_string ) ) {

$t_mantis_user_pref_table = config_get( 'mantis_user_pref_table' );
$t_mantis_user_table = config_get( 'mantis_user_table' );

$query = "SELECT DISTINCT language
FROM $t_mantis_user_pref_table p, $t_mantis_user_table u
WHERE u.cookie_string='$t_user_language' AND
WHERE u.cookie_string='$t_cookie_string' AND
u.id=p.user_id";

$result = db_query( $query );
Expand Down

0 comments on commit af0bac5

Please sign in to comment.