includes/lang.php
changeset 239 0f1b353570a7
parent 215 94db56b8124f
child 241 c671f3bb8aed
equal deleted inserted replaced
238:a78537db2850 239:0f1b353570a7
    86     else
    86     else
    87     {
    87     {
    88       $db->_die('lang.php - attempting to pass invalid value to constructor');
    88       $db->_die('lang.php - attempting to pass invalid value to constructor');
    89     }
    89     }
    90     
    90     
    91     $lang_default = ( $x = getConfig('default_language') ) ? intval($x) : 'def';
    91     $lang_default = ( $x = getConfig('default_language') ) ? intval($x) : '\'def\'';
    92     $q = $db->sql_query("SELECT lang_id, lang_code, last_changed, ( lang_id = $lang_default ) AS is_default FROM " . table_prefix . "language WHERE $sql_col OR lang_id = $lang_default ORDER BY is_default DESC LIMIT 1;");
    92     $q = $db->sql_query("SELECT lang_id, lang_code, last_changed, ( lang_id = $lang_default ) AS is_default FROM " . table_prefix . "language WHERE $sql_col OR lang_id = $lang_default ORDER BY is_default DESC LIMIT 1;");
    93     
    93     
    94     if ( !$q )
    94     if ( !$q )
    95       $db->_die('lang.php - main select query');
    95       $db->_die('lang.php - main select query');
    96     
    96