equal
deleted
inserted
replaced
3204 );'); |
3204 );'); |
3205 if ( !$q ) |
3205 if ( !$q ) |
3206 $db->_die('functions.php - installing language'); |
3206 $db->_die('functions.php - installing language'); |
3207 |
3207 |
3208 $lang_id = $db->insert_id(); |
3208 $lang_id = $db->insert_id(); |
3209 if ( empty($lang_id) ) |
3209 if ( empty($lang_id) || $lang_id == 0 ) |
3210 return false; |
3210 { |
|
3211 $db->_die('functions.php - invalid returned lang_id'); |
|
3212 } |
3211 |
3213 |
3212 // Do we also need to install a language file? |
3214 // Do we also need to install a language file? |
3213 if ( is_string($lang_file) && file_exists($lang_file) ) |
3215 if ( is_string($lang_file) && file_exists($lang_file) ) |
3214 { |
3216 { |
3215 $lang = new Language($lang_id); |
3217 $lang = new Language($lang_id); |
3216 $lang->import($lang_file); |
3218 $lang->import($lang_file); |
|
3219 $lang->fetch(false); |
|
3220 $lang->regen_caches(); |
3217 } |
3221 } |
3218 else if ( is_string($lang_file) && !file_exists($lang_file) ) |
3222 else if ( is_string($lang_file) && !file_exists($lang_file) ) |
3219 { |
3223 { |
3220 echo '<b>Notice:</b> Can\'t load language file, so the specified language wasn\'t fully installed.<br />'; |
3224 echo '<b>Notice:</b> Can\'t load language file, so the specified language wasn\'t fully installed.<br />'; |
3221 return false; |
3225 return false; |