payload.php stg_language_setup() should set default language now
authorDan
Mon, 28 Jan 2008 21:40:15 -0500
changeset 385 ca6913ea2d44
parent 384 42522b5bb227
child 386 f0978aed065a
payload.php stg_language_setup() should set default language now
install/includes/payload.php
--- a/install/includes/payload.php	Mon Jan 28 21:19:50 2008 -0500
+++ b/install/includes/payload.php	Mon Jan 28 21:40:15 2008 -0500
@@ -322,6 +322,14 @@
   $lang_local->import( ENANO_ROOT . "/language/{$lang_info['dir']}/tools.json" );
   $lang_local->import( ENANO_ROOT . "/language/{$lang_info['dir']}/admin.json" );
   
+  $q = $db->sql_query('SELECT lang_id FROM ' . table_prefix . 'language ORDER BY lang_id DESC LIMIT 1;');
+  if ( !$q )
+    $db->_die();
+  
+  list($lang_id_int) = $db->fetchrow_num();
+  $db->free_result();
+  setConfig('default_language', $lang_id_int);
+  
   return true;
 }